about summary refs log tree commit diff stats
path: root/mu.md
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-07-16 22:34:57 -0700
committerKartik Agaram <vc@akkartik.com>2020-07-16 22:34:57 -0700
commit28b25a489338f31f291832e8dc94174619387e95 (patch)
tree2bb64dedeb89f7618913f38184ae6e796417a18a /mu.md
parent571dd3e23c2cfd4c3665c073a248cee4e1acd594 (diff)
downloadmu-28b25a489338f31f291832e8dc94174619387e95.tar.gz
6657
Diffstat (limited to 'mu.md')
-rw-r--r--mu.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/mu.md b/mu.md
index be91fc10..aadb78e8 100644
--- a/mu.md
+++ b/mu.md
@@ -438,18 +438,19 @@ rules:
 
 Try to avoid mixing these use cases.
 
-You can save handles inside compound types like this:
+If you have a variable `src` of type `(handle ...)`, you can save it inside a
+compound type like this (provided the types match):
 
 ```
-var y/reg: (addr handle T_f) <- get var: (addr T), f
-copy-handle-to *y, x
+var dest/reg: (addr handle T_f) <- get var: (addr T), f
+copy-handle src, dest
 ```
 
 Or this:
 
 ```
-var y/reg: (addr handle T) <- index arr: (addr array handle T), n
-copy-handle-to *y, x
+var dest/reg: (addr handle T) <- index arr: (addr array handle T), n
+copy-handle src, dest
 ```
 
 To create handles to non-array types, use `allocate`: