diff --git a/src/libstd/option.rs b/src/libstd/option.rs index 403cb47f47e64..9ab74496d0b0f 100644 --- a/src/libstd/option.rs +++ b/src/libstd/option.rs @@ -70,7 +70,7 @@ Function: maybe Applies a function to the contained value or returns a default */ -fn maybe(def: U, f: block(T) -> U, opt: t) -> U { +fn maybe(def: U, opt: t, f: block(T) -> U) -> U { alt opt { none. { def } some(t) { f(t) } } } @@ -80,7 +80,7 @@ Function: may Performs an operation on the contained value or does nothing */ -fn may(f: block(T), opt: t) { +fn may(opt: t, f: block(T)) { alt opt { none. {/* nothing */ } some(t) { f(t); } } }