core: Demode option
This commit is contained in:
@@ -957,7 +957,7 @@ pure fn find<T: Copy>(v: &[T], f: fn(T) -> bool) -> Option<T> {
|
||||
*/
|
||||
pure fn find_between<T: Copy>(v: &[T], start: uint, end: uint,
|
||||
f: fn(T) -> bool) -> Option<T> {
|
||||
option::map(position_between(v, start, end, f), |i| v[i])
|
||||
position_between(v, start, end, f).map(|i| v[i])
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -980,7 +980,7 @@ pure fn rfind<T: Copy>(v: &[T], f: fn(T) -> bool) -> Option<T> {
|
||||
*/
|
||||
pure fn rfind_between<T: Copy>(v: &[T], start: uint, end: uint,
|
||||
f: fn(T) -> bool) -> Option<T> {
|
||||
option::map(rposition_between(v, start, end, f), |i| v[i])
|
||||
rposition_between(v, start, end, f).map(|i| v[i])
|
||||
}
|
||||
|
||||
/// Find the first index containing a matching value
|
||||
|
||||
Reference in New Issue
Block a user