ref: cc61b84219f29c4bf874e579986ef77bcc6a0ad3
parent: d3ed26c37dedef85e3b193724facde2ee24acb64
author: Ori Bernstein <[email protected]>
date: Mon Feb 17 17:51:13 EST 2014
Clean up some libstd APIs.
--- a/libstd/option.myr
+++ b/libstd/option.myr
@@ -7,18 +7,5 @@
`Some @a
`None
;;
-
- generic try : (v : option(@a), msg : byte[:], args : ... -> @a)
- generic tryv : (v : option(@a), msg : byte[:], args : valist -> @a)
;;
-generic try = {v, msg, args
- -> tryv(v, msg, vastart(&args))
-}
-
-generic tryv = {v, msg, ap
- match v
- | `None: fatalv(1, msg, ap)
- | `Some a: -> a
- ;;
-}
--- a/libstd/slinsert.myr
+++ b/libstd/slinsert.myr
@@ -4,10 +4,10 @@
use "fmt.use"
pkg std =
- generic slinsert : (sl : @a[:], idx : size, elt : @a -> @a[:])
+ generic slput : (sl : @a[:], idx : size, elt : @a -> @a[:])
;;
-generic slinsert = {sl, idx, elt
+generic slput = {sl, idx, elt
var i
var len