rudus/sandbox.ld

27 lines
377 B
Plaintext

let test = 2
loop ([1, 2, 3]) with {
([]) -> false
([x]) -> eq? (x, test)
([x, ...xs]) -> if eq? (x, test)
then true
else recur (xs)
}
let foo = :bar
fn not {
(false) -> true
(nil) -> true
(_) -> false
}
& loop ([1, 2, 3]) with {
& ([]) -> false
& ([y]) -> eq? (y, test)
& ([y, ...ys]) -> if not (eq? (y, test))
& then recur (ys)
& else true
& }