summaryrefslogtreecommitdiff
path: root/lib/std/slpush.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-02 11:30:24 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-02 11:30:24 -0800
commitad4d1397fb08b0d205e623f9a7c74fa19afb1c8c (patch)
tree98fae98b43ee63812619d17ce93e39c4104e1f89 /lib/std/slpush.myr
parent0205329e24d0e078a8150020843586cbd12613c8 (diff)
downloadmc-ad4d1397fb08b0d205e623f9a7c74fa19afb1c8c.tar.gz
Make slpush take an address.
Diffstat (limited to 'lib/std/slpush.myr')
-rw-r--r--lib/std/slpush.myr8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/slpush.myr b/lib/std/slpush.myr
index 0fa0021..cc15f1f 100644
--- a/lib/std/slpush.myr
+++ b/lib/std/slpush.myr
@@ -2,7 +2,7 @@ use "types"
use "alloc"
pkg std =
- generic slpush : (sl : @a[:], elt : @a -> @a[:])
+ generic slpush : (sl : @a[:]#, elt : @a -> @a[:])
;;
generic slpush = {sl, elt
@@ -14,7 +14,7 @@ generic slpush = {sl, elt
a bucket boundary, this is effectively
growing the slice by powers of two.
*/
- sl = slgrow(sl, sl.len + 1)
- sl[sl.len - 1] = elt
- -> sl
+ sl# = slgrow(sl#, sl#.len + 1)
+ sl#[sl#.len - 1] = elt
+ -> sl#
}