summaryrefslogtreecommitdiff
path: root/docs/language
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-07-12 11:43:56 -0400
committernodist <kevin.comas.git@gmail.com>2026-07-12 11:43:56 -0400
commitf1773b4959a35f28b37617f775f4fc1683e4f654 (patch)
tree9a7188c386d117d198e818087b04f180942c36ae /docs/language
parent5fadfba312fcd0367a3341c5d194b7955627c177 (diff)
function types
Diffstat (limited to 'docs/language')
-rw-r--r--docs/language/ownership.md7
1 files changed, 2 insertions, 5 deletions
diff --git a/docs/language/ownership.md b/docs/language/ownership.md
index 2c5de36..26eebe1 100644
--- a/docs/language/ownership.md
+++ b/docs/language/ownership.md
@@ -19,14 +19,11 @@
References are automatically taken if the function signature specifies ref
```text
-inc_push_to_ref : ([%ref x; y]
- x `push y + 1
-)
int_array : Array[I64] $ ()
float_array : Array[F64] $ ()
@ 0 .. 2 {[x]
- inc_push_to_ref `sync (int_array, x)
- inc_push_to_ref `sync (float_array, F64 $ x)
+ ([%ref x; y] x `push y + 1) `sync (int_array, x)
+ ([%ref x; y] x `push y + 1) `sync (float_array, F64 $ x)
}
`log int_array // Array[I64] $ (1; 2; 3)
`log float_array // Array[F64] $ (1.0; 2.0; 3.0)