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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
@module ref
ref value = Ref (spawn [ ! => loop value ])
loop value = receive [
.set new-value => loop new-value
p, id, .get => { send p (id, value); loop value }
]
# a comment
@object Ref pid [
set val = .set val > send pid
get! = .get > send-wait pid
]
@def @module [
[ <name:IDENT> = [ <*body> ] ] => \q[<*body>]
> compile-module
> $ns/mount-module name
]
partial-cons x = [.cons x $]
foo = ~(bar)
start-sprinklers -when: 'later
prune -harvest
one `and two `or three
foo = ...
@method map _ %
@check %list [
.cons _ _
.nil
]
5 > add 3
< foo : IDENT >
"{interpolation $(thing (with (parentheses)))}
print '{hello world}
print "hello double \" quotes"
print \thing{hello world}
print \with-escapes{here is a curly: \} <- }
print \with-nesting{ some curlies: {} <- }
|