diff options
| author | Patrick Walton <[email protected]> | 2010-11-03 17:10:37 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-11-05 10:23:22 -0700 |
| commit | 1d214b4df3013a53e50d778fa921ed99bc498d02 (patch) | |
| tree | c87006304b72bd7fec9962afac5370de4e2d57bd /src/lib/list.rs | |
| parent | Fix buggy while and do-while translation in rustc. Add test. (diff) | |
| download | rust-1d214b4df3013a53e50d778fa921ed99bc498d02.tar.xz rust-1d214b4df3013a53e50d778fa921ed99bc498d02.zip | |
Move the option type to its own module
Diffstat (limited to 'src/lib/list.rs')
| -rw-r--r-- | src/lib/list.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/list.rs b/src/lib/list.rs index da8d3c0a..8e0380d1 100644 --- a/src/lib/list.rs +++ b/src/lib/list.rs @@ -1,7 +1,7 @@ -import util.option; -import util.some; -import util.none; +import option; +import option.some; +import option.none; // FIXME: It would probably be more appealing to define this as // type list[T] = rec(T hd, option[@list[T]] tl), but at the moment @@ -27,7 +27,7 @@ fn foldl[T,U](&list[T] ls, &U u, fn(&T t, U u) -> U f) -> U { } fn find[T,U](&list[T] ls, - (fn(&T) -> option[U]) f) -> option[U] { + (fn(&T) -> option.t[U]) f) -> option.t[U] { alt(ls) { case (cons[T](?hd, ?tl)) { alt (f(hd)) { |