add a sandbox file to replace in-code Rust string
This commit is contained in:
parent
0b27944d11
commit
813a79a415
29
sandbox.ld
Normal file
29
sandbox.ld
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
let test = 2
|
||||||
|
|
||||||
|
& loop ([1, 2, 3]) with {
|
||||||
|
& ([]) -> false
|
||||||
|
& ([x]) -> eq? (x, test)
|
||||||
|
& ([x, ...xs]) -> {
|
||||||
|
& let foo = :bar
|
||||||
|
& when {
|
||||||
|
& eq? (x, test) -> true
|
||||||
|
& :else -> recur (xs)
|
||||||
|
& }
|
||||||
|
& }
|
||||||
|
& }
|
||||||
|
|
||||||
|
fn not {
|
||||||
|
(false) -> true
|
||||||
|
(nil) -> true
|
||||||
|
(_) -> false
|
||||||
|
}
|
||||||
|
|
||||||
|
loop ([1, 2, 3]) with {
|
||||||
|
([]) -> false
|
||||||
|
([x]) -> eq? (x, test)
|
||||||
|
([x, ...xs]) -> if not (eq? (x, test))
|
||||||
|
then recur (xs)
|
||||||
|
else true
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user