diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-06-03 15:26:26 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-06-03 15:26:26 -0400 |
| commit | f3e3fd0cdba8d2f9f49be279ac3c0ec87a44609b (patch) | |
| tree | a993e1539cf90362141db8a4c43f1f9f3ff7ef42 /docs/language/ownership.md | |
| parent | b26ad08b39b8229dcea0bafc4a8ba4b0d7ad7154 (diff) | |
refs with more impl
Diffstat (limited to 'docs/language/ownership.md')
| -rw-r--r-- | docs/language/ownership.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/language/ownership.md b/docs/language/ownership.md index 289846c..9af214b 100644 --- a/docs/language/ownership.md +++ b/docs/language/ownership.md @@ -4,10 +4,36 @@ # Copying +## Assignment + # Moving +## Assignment is not allowed for movable types that are not shared + +## Shared Types + ## To And From Functions +# Passing + +## References + +References are automatically taken if the function signature specifies ref + +```text +inc_push_to_ref : Fn[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) +} +`log int_array // Array[I64] $ (1; 2; 3) +`log float_array // Array[F64] $ (1.0; 2.0; 3.0) +``` + # Locking ## References |
