diff --git a/src/lib/util.rs b/src/lib/util.rs index e0e52c8f93a..af031d7d650 100644 --- a/src/lib/util.rs +++ b/src/lib/util.rs @@ -1,8 +1,8 @@ type option[T] = tag(none(), some(T)); -type map[T, U] = fn(&T) -> U; +type operator[T, U] = fn(&T) -> U; -fn option_map[T, U](map[T, U] f, &option[T] opt) -> option[U] { +fn option_map[T, U](&operator[T, U] f, &option[T] opt) -> option[U] { alt (opt) { case (some[T](x)) { ret some[U](f[T, U](x));