about summary refs log tree commit diff
path: root/src/lib/either.rs
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2011-08-12 11:47:44 -0700
committerMichael Sullivan <sully@msully.net>2011-08-12 11:47:44 -0700
commit8a9766000ec60f2d381a8bc64cde1b7e9abc7c6b (patch)
treec2cdcbda37d24324e5afd13ede1dcde44bb017c9 /src/lib/either.rs
parentde4b383a0f6959ce4376274c5cae1b94bb76947c (diff)
downloadrust-8a9766000ec60f2d381a8bc64cde1b7e9abc7c6b.tar.gz
rust-8a9766000ec60f2d381a8bc64cde1b7e9abc7c6b.zip
Change a bunch of places in the stdlib to use blocks.
Diffstat (limited to 'src/lib/either.rs')
-rw-r--r--src/lib/either.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/either.rs b/src/lib/either.rs
index 5ca232a617f..4c84e804185 100644
--- a/src/lib/either.rs
+++ b/src/lib/either.rs
@@ -5,11 +5,8 @@ import option::none;
 
 tag t[T, U] { left(T); right(U); }
 
-type operator[T, U] = fn(&T) -> U ;
-
-fn either[T, U,
-          V](f_left: &operator[T, V], f_right: &operator[U, V],
-             value: &t[T, U]) -> V {
+fn either[T, U, V](f_left: &block(&T) -> V, f_right: &block(&U) -> V,
+                   value: &t[T, U]) -> V {
     alt value { left(l) { f_left(l) } right(r) { f_right(r) } }
 }