summaryrefslogtreecommitdiff
path: root/docs/type_system/fn.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/type_system/fn.md')
-rw-r--r--docs/type_system/fn.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/type_system/fn.md b/docs/type_system/fn.md
index 28fe437..5a723f6 100644
--- a/docs/type_system/fn.md
+++ b/docs/type_system/fn.md
@@ -3,7 +3,7 @@
---
```text
-Fn_class `alias Enum[.unknown; .incomplete; .process; .generator; .iterator; .closure; .bound; .regex; .native]
+Fn_class `alias Enum[.unknown; .incomplete; .native; process; .generator; .iterator; .closure; .bound; .regex]
Fn[Fn_class; RETURN_TYPE; Tuple[ARGS]; STATE; List]
```
@@ -18,6 +18,10 @@ Placeholder before evaluation
A function with an incomplete type, type checking occurs at invocation
+## Native
+
+Native function wrapper
+
## Process
A list of tasks with state
@@ -42,10 +46,6 @@ A function with some arguments already set
Regular Expression
-## Native
-
-Native function wrapper
-
# Returning
## \`return
@@ -61,14 +61,14 @@ Yielding wraps the value in the transient union `Next`
Return `Void` to stop iteration
```text
-fn : Fn[n] $ ( @ 1 < n { `yield 2 * x; n +: 1 }[x] )
+fn : Fn[n] $ ( @ 1 < n {[x] `yield 2 * x; n +: 1 } )
it : fn `call 10
// invoking
-@ it { `log v }[v] // 2 4 6 8 10 12 14 16 18 20
+@ it {[v] `log v } // 2 4 6 8 10 12 14 16 18 20
// same as above
@ {
# `call it {
- .value { `log v }[v]
+ .value {[v] `log v }
.done { `break }
}
}