Update README
This commit is contained in:
parent
fa7fb57600
commit
5beda4695d
@ -225,12 +225,12 @@ Functions are first-class values in dust, so they are assigned to variables like
|
|||||||
|
|
||||||
```dust
|
```dust
|
||||||
# This simple function has no arguments.
|
# This simple function has no arguments.
|
||||||
say_hi = fn || {
|
say_hi = (fn) {
|
||||||
(output "hi")
|
(output "hi")
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function has one argument and will return a value.
|
# This function has one argument and will return a value.
|
||||||
add_one <(int) -> int> = fn |number| {
|
add_one = (fn number <num>) <num> {
|
||||||
number + 1
|
number + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user