blob: f6196556d097258d4ff3a78ad027d5f4daeac2e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
(.module:
[lux #*
["_" test (#+ Test)]
[abstract
[monad (#+ do)]]
[control
["." try]
[concurrency
["." promise]]]
[math
["." random]]]
[///
["@." profile]]
{#program
["." /]})
(def: #export test
Test
(<| (_.covering /._)
(do random.monad
[profile @profile.random]
(wrap (do promise.monad
[verdict (do (try.with promise.monad)
[_ (/.do! profile)]
(wrap true))]
(_.cover' [/.do!]
(try.default false verdict)))))))
|