Mercurial > hg > ishara
view arrows/ascan.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
% ascan - Arrow to implement scanl. % % ascan :: ((A,S)->S), S -> arrow({A},{S},S). function o=ascan(sfn,x0) o=loop(@st,@(sz)x0); function [y,s]=st(x,s), s=sfn(x,s); y=s; end end