forked from Orchid/orchid
A lot of stuff I'm not gonna enumerate
rule fundamentals
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import std::io::(println, out) -- imports
|
||||
-- import std::io::(println, out) -- imports
|
||||
|
||||
-- single word rule (alias)
|
||||
greet =1=> (\name. printf out "Hello {}!\n" [name])
|
||||
@@ -7,12 +7,15 @@ greet =1=> (\name. printf out "Hello {}!\n" [name])
|
||||
export ;> $a =200=> (greet $a)
|
||||
|
||||
-- single-word exported rule
|
||||
export main = (
|
||||
export main == (
|
||||
print "What is your name?" >>
|
||||
readln >>= \name.
|
||||
greet name
|
||||
)
|
||||
|
||||
export < $a ...$rest /> == (createElement (tok_to_str $a) [(props_carriage ...$rest)])
|
||||
export (props_carriage $key = $value) == (tok_to_str $key) => $value
|
||||
|
||||
-- The broadest trait definition in existence
|
||||
Foo = (Bar Baz)
|
||||
Foo == (Bar Baz)
|
||||
-- default anyFoo = @T. @impl:(T (Bar Baz)). impl:(T Foo)
|
||||
Reference in New Issue
Block a user