Mercurial > hg > ishara
view arrows/@aswitch/aswitch.m @ 27:5de03f77dae1
Added documentation about types and revised arrow type specifications.
author | samer |
---|---|
date | Sat, 19 Jan 2013 14:22:09 +0000 |
parents | 672052bd81f8 |
children |
line wrap: on
line source
% aswitch - switching arrow % % aswitch :: % arrow(A@typelist(N),B@typelist(M),S) % -> arrow([A,{box(arrow(A,B,S))}], B,S). % % The resulting arrow has N+1 inputs and M outputs. The last input % is for boxed arrows, that is, a stream of events consisting of % arrows. When a new arrow arrives, the aswitch arrow starts behaving % like it. function o=aswitch(a) s.base=a; o=class(s,'aswitch',arrow(nargin(a)+1,nargout(a))); end