grokking simplicity and refactoring
This commit is contained in:
parent
89a7fe100d
commit
fb4361d938
67 changed files with 6275 additions and 56 deletions
13
packages/lab-tool/utils/json/pretty-print.scm
Normal file
13
packages/lab-tool/utils/json/pretty-print.scm
Normal file
|
@ -0,0 +1,13 @@
|
|||
;; utils/json/pretty-print.scm - JSON pretty printing
|
||||
|
||||
(define-module (utils json pretty-print)
|
||||
#:use-module (json)
|
||||
#:export (json-pretty-print))
|
||||
|
||||
;; Impure function: Pretty print JSON to current output port
|
||||
;; Input: obj (scheme object)
|
||||
;; Output: unspecified (side effect: prints to current-output-port)
|
||||
(define (json-pretty-print obj)
|
||||
"Pretty print JSON object to current output port"
|
||||
(scm->json obj (current-output-port) #:pretty #t)
|
||||
(newline))
|
Loading…
Add table
Add a link
Reference in a new issue