Skip to content

Instantly share code, notes, and snippets.

@kristianlm
Created September 1, 2013 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristianlm/6407121 to your computer and use it in GitHub Desktop.
Save kristianlm/6407121 to your computer and use it in GitHub Desktop.
testing chicken-mongo's bson
(use bson mongo)
(define (mak n)
(if (> n 0)
`((int . 1)
(double . 1.5)
(false . #f)
(nested ,@(mak (sub1 n))))
"the end"))
(let loop ((n 0) (obj (mak 100)))
(print n " ... " obj)
(if (= 0 (modulo n 1000))
(fprintf (current-error-port) "~a\n" n))
(loop (add1 n) (bson->obj (bson obj))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment