mirror of
https://github.com/janet-lang/janet
synced 2024-11-15 05:04:49 +00:00
19 lines
371 B
Plaintext
19 lines
371 B
Plaintext
(export! "scheck" (fn [x]
|
|
(: dat (serialize x))
|
|
(: deser (deserialize dat))
|
|
(print (debugp deser))
|
|
deser
|
|
))
|
|
|
|
(scheck 1)
|
|
(scheck true)
|
|
(scheck nil)
|
|
(scheck "asdasdasd")
|
|
(scheck (struct 1 2 3 4))
|
|
(scheck (tuple 1 2 3))
|
|
(scheck 123412.12)
|
|
(scheck (funcdef (fn [] 1)))
|
|
(scheck (funcenv (fn [] 1)))
|
|
(scheck (funcenv ((fn [a] (fn [] a)) 1)))
|
|
(scheck (fn [] 1))
|