From 040fb35732e6c7c0d8f4ccf7c9bee7242cea6939 Mon Sep 17 00:00:00 2001 From: nodist Date: Mon, 1 Jun 2026 18:08:43 -0400 Subject: update action syntax and start application --- docs/type_system/fn.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'docs/type_system/fn.md') 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 } } } -- cgit v1.2.3