% 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
