Mercurial > hg > ishara
view sequences/dropwhile.m @ 2:7357e1dc2ad6
Simplified scheduler library with new schedule representation.
author | samer |
---|---|
date | Sat, 22 Dec 2012 16:17:51 +0000 |
parents | 672052bd81f8 |
children |
line wrap: on
line source
function s=dropwhile(f,s) % drop - Drop elements of sequence that satisfy condition % % drop :: (A->bool), seq A -> seq A % if isempty(s) return s; end x=head(s); while f(x), s=next(s); if isempty(s), break; end x=head(s); end