view arrows/@aswitch/aswitch.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents 5de03f77dae1
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