remove remaining is_not_empty functions/methods
This commit is contained in:
parent
ec3f6e1932
commit
e4337a9def
18 changed files with 17 additions and 54 deletions
|
|
@ -23,7 +23,7 @@ pure fn pure_length<T: Copy>(ls: @List<T>) -> uint { pure_length_go(ls, 0u) }
|
|||
pure fn nonempty_list<T: Copy>(ls: @List<T>) -> bool { pure_length(ls) > 0u }
|
||||
|
||||
fn safe_head<T: Copy>(ls: @List<T>) -> T {
|
||||
assert is_not_empty(ls);
|
||||
assert !is_empty(ls);
|
||||
return head(ls);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// In this case, the code should compile and should
|
||||
// succeed at runtime
|
||||
use vec::{head, is_not_empty, last, same_length, zip};
|
||||
use vec::{head, last, same_length, zip};
|
||||
|
||||
fn enum_chars(start: u8, end: u8) -> ~[char] {
|
||||
assert start < end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue