(.using [library [lux "*" ["_" test {"+" Test}] [abstract [monad {"+" do}]] [control ["[0]" io]] [math ["[0]" random]]]] [\\library ["[0]" /]]) (/.import: (os/getenv [/.String] "io" "?" /.String)) (def: .public test Test (do [! random.monad] [boolean random.bit integer random.int float random.frac string (random.ascii/lower 1)] (<| (_.covering /._) (`` ($_ _.and (~~ (template [ ] [(_.cover [] (exec (: ) true))] [/.Boolean boolean] [/.Integer integer] [/.Float float] [/.String string] )) (_.for [/.Object] ($_ _.and (~~ (template [] [(_.cover [] (exec (|> [] (:as ) (: (Ex (_ a) (/.Object a)))) true))] [/.Nil] [/.Table] )))) (_.cover [/.Function /.closure] (exec (|> (/.closure [input/0] input/0) (: /.Function) (: (Ex (_ a) (/.Object a)))) true)) (_.cover [/.import:] (case (io.run! (..os/getenv string)) {.#Some _} true {.#None} true)) )))))