forked from Orchid/orchid
backup commit
This commit is contained in:
18
notes.md
18
notes.md
@@ -1,18 +0,0 @@
|
||||
# Anatomy of a code file
|
||||
|
||||
```orchid
|
||||
import std::io::(println, out) -- imports
|
||||
|
||||
-- single word substitution (alias)
|
||||
greet == \name. printf out "Hello {}!\n" [name]
|
||||
|
||||
-- multi-word exported substitution with nonzero priority
|
||||
export (...$pre ;) $a ...$post) =200=> (...$pre (greet $a) ...$post)
|
||||
|
||||
-- single-word exported substitution
|
||||
export main == (
|
||||
print "What is your name? >>
|
||||
readln >>= \name.
|
||||
greet name
|
||||
)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user