• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
      • Io
      • Defttag
      • Sys-call
      • Save-exec
      • Quicklisp
      • Oslib
      • Std/io
      • Bridge
        • Json-encoding
          • Json-encode-main
          • Json-encode-weird-char
          • Json-encode-atom
          • Json-encode
          • Json-encode-chars
          • Json-encode-char
          • Json-encode-str
          • Json-simple-alist-p
          • Json-comma-and-maybe-newline
          • Security
          • Command
          • In-main-thread
          • Message
          • Start
          • Bindings
          • Stop
          • Try-in-main-thread
        • Clex
        • Tshell
        • Unsound-eval
        • Hacker
        • Startup-banner
        • Command-line
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Json-encoding

    Json-comma-and-maybe-newline

    Signature
    (json-comma-and-maybe-newline acc) → *

    Definitions and Theorems

    Function: json-comma-and-maybe-newline

    (defun json-comma-and-maybe-newline (acc)
           (declare (xargs :guard t))
           (let ((__function__ 'json-comma-and-maybe-newline))
                (declare (ignorable __function__))
                (if (and (consp acc)
                         (or (eql (car acc) #\])
                             (eql (car acc) #\})))
                    (cons #\Newline (cons #\, acc))
                    (cons #\, acc))))