ref: c9ffabb3d4425533371659bed8bbda68712122e7
parent: da1de51de2edb383cc26a1b726df4cfc9328e1c7
parent: 137d0b96baa72f12a83e60f6b507f81a9a3bee4c
author: Ori Bernstein <[email protected]>
date: Thu Dec 12 11:45:01 EST 2013
Merge branch 'master' of git+ssh://git.eigenstate.org/git/ori/mc
--- /dev/null
+++ b/libstd/slpush.myr
@@ -1,0 +1,13 @@
+use "types.use"
+use "alloc.use"
+use "fmt.use"
+
+pkg std =
+ generic slpush : (sl : @a[:], elt : @a -> @a[:])
+;;
+
+generic slpush = {sl, elt
+ sl = slgrow(sl, sl.len + 1)
+ sl[sl.len - 1] = elt
+ -> sl
+}