Mercurial > hg > ishara
view sequences/dropwhile.m @ 0:672052bd81f8
Initial partial import.
author | samer |
---|---|
date | Wed, 19 Dec 2012 22:38:28 +0000 |
parents | |
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