Mercurial > hg > ishara
view sequences/split.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 [h,t]=split(dim,n,s) % split - gather first n elements and return with rest of sequence % % split :: D:natural, N:natural, seq A -> [[N]->A], seq A h=[]; for i=1:n, x=head(s); h=cat(dim,h,x); s=next(s); end t=s;