summaryrefslogtreecommitdiff
path: root/lib/std/search.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-09-12 09:01:39 -0700
committerOri Bernstein <ori@eigenstate.org>2015-09-15 23:01:09 -0700
commit610852e18629b8a9a4c4f4ed6e6fc7a336152511 (patch)
treeb69e2c8d29091b688115a499a50521d6d81cad1a /lib/std/search.myr
parentae9a74441cba3160943ad18bf500781143bff096 (diff)
downloadmc-610852e18629b8a9a4c4f4ed6e6fc7a336152511.tar.gz
Move to use 'for var i = ...' construct.
Diffstat (limited to 'lib/std/search.myr')
-rw-r--r--lib/std/search.myr4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/std/search.myr b/lib/std/search.myr
index 725e419..fa2ae40 100644
--- a/lib/std/search.myr
+++ b/lib/std/search.myr
@@ -8,9 +8,7 @@ pkg std =
/* linear search over a list of values */
generic lsearch = {sl, val, cmp
- var i
-
- for i = 0; i < sl.len; i++
+ for var i = 0; i < sl.len; i++
match cmp(sl[i], val)
| `Equal:
-> `Some i