Mercurial > hg > ishara
view sequences/@seq/span.m @ 53:3ba80c9914ff
Minor doc fix, added .class to .hgignore
author | samer |
---|---|
date | Mon, 02 Feb 2015 10:47:55 +0000 |
parents | 3f77126f7b5f |
children |
line wrap: on
line source
function [h,x]=span(f,x) % span - divide sequence using a test function % % span :: (A->bool), seq(A) -> seq(A), seq(A). % % span(f,x) = takeWhile(f,x), dropWhile(f,x) % Will not terminate if head segments turns out to be infinite. [Y,x]=spanc(f,x); h=cellseq(Y);