diff options
author | Eduardo Julian | 2017-01-25 20:30:44 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-01-25 20:30:44 -0400 |
commit | 216a12cd02337c83c889a667063e0c06f2944e65 (patch) | |
tree | 5394a1bbf8df4d28de5625fd1803bf2ccbbe1a04 /stdlib/source/lux.lux | |
parent | 0a9547eed8546519e883bc40a38104842de2988c (diff) |
- Moved the lux/data/struct/* modules to lux/data/coll/*.
- Did the same for the lux/codata/struct/* modules.
- Moved lux/codata/io to lux/io.
- Moved lux/control/effect to lux/effect.
- Renamed "sample" functions to "this" functions.
- Renamed "at" functions to "nth" functions.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux.lux | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index bb53b987e..f86d8cdae 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -3234,7 +3234,7 @@ (list module) (list& (substring2 0 idx module) (split-module (substring1 (i.+ 1 idx) module)))))) -(def: (at idx xs) +(def: (nth idx xs) (All [a] (-> Int (List a) (Maybe a))) (case xs @@ -3244,7 +3244,7 @@ (#Cons x xs') (if (i.= idx 0) (#Some x) - (at (i.- 1 idx) xs') + (nth (i.- 1 idx) xs') ))) (def: (beta-reduce env type) @@ -3279,7 +3279,7 @@ (#LambdaT (beta-reduce env ?input) (beta-reduce env ?output)) (#BoundT idx) - (case (at (_lux_proc ["nat" "to-int"] [idx]) env) + (case (nth (_lux_proc ["nat" "to-int"] [idx]) env) (#Some bound) bound @@ -3870,7 +3870,7 @@ num-ups (length ups)] (if (i.= num-ups 0) (return module) - (case (at num-ups (split-module-contexts module-name)) + (case (nth num-ups (split-module-contexts module-name)) #None (fail (Text/append "Can't clean module: " module)) @@ -4491,7 +4491,7 @@ lux (lux (control (monad #as M #refer #all)) (data (text #open (\"Text/\" Monoid<Text>)) - (struct (list #open (\"List/\" Monad<List>))) + (coll (list #open (\"List/\" Monad<List>))) maybe (ident #open (\"Ident/\" Codec<Text,Ident>))) meta @@ -4502,7 +4502,7 @@ lux (lux (control [\"M\" monad #*]) (data [text \"Text/\" Monoid<Text>] - (struct [list \"List/\" Monad<List>]) + (coll [list \"List/\" Monad<List>]) maybe [ident \"Ident/\" Codec<Text,Ident>]) meta @@ -4735,7 +4735,7 @@ [#;ExQ]) (#;BoundT idx) - (default type (list;at idx env)) + (default type (list;nth idx env)) _ type |