summaryrefslogtreecommitdiff
path: root/libstd/htab.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-10-28 15:39:01 -0400
committerOri Bernstein <ori@eigenstate.org>2013-10-28 15:39:01 -0400
commit89e514d5355f9036a30c4a41cacc465e5999aa76 (patch)
treef6402fddce8bde453291627cdd4d8db2ad0fd59e /libstd/htab.myr
parent682c4ce6114cb44e2ad95a75269585f6e1da8150 (diff)
downloadmc-89e514d5355f9036a30c4a41cacc465e5999aa76.tar.gz
Streamline syntax.
Move from: match foo bar: action ;; baz: action ;; To: match foo | bar: action | baz: action ;;
Diffstat (limited to 'libstd/htab.myr')
-rw-r--r--libstd/htab.myr14
1 files changed, 6 insertions, 8 deletions
diff --git a/libstd/htab.myr b/libstd/htab.myr
index 9c7fe46..15bea60 100644
--- a/libstd/htab.myr
+++ b/libstd/htab.myr
@@ -139,27 +139,25 @@ generic htput = {ht, k, v
generic htdel = {ht, k
match idx(ht, k)
- `Some i:
+ | `Some i:
ht.dead[i] = true
ht.nelt--
- ;;
- _:
+ | _:
/* do nothing */
- ;;
;;
}
generic htget = {ht, k
match idx(ht, k)
- `Some i: -> `Some ht.vals[i];;
- `None: -> `None;;
+ | `Some i: -> `Some ht.vals[i]
+ | `None: -> `None
;;
}
generic hthas = {ht, k
match idx(ht, k)
- `Some i: -> true;;
- `None: -> false;;
+ | `Some i: -> true
+ | `None: -> false
;;
}