% erate - Drive sub-arrow at event rate, ie when events arrive
%
% erate :: arrow(A@typelist(N),B@typelist(M),S),
% -> arrow(events(A), events(B),S).
%
% the type events(A) denotes a list of types where each
% type is a boxed version of the the corresponding type in A.
% The boxed type boxed(A) is either {} (no-event) or {A},
% (event with data of type A). If the encapsulated arrow has
% multiple inputs, the arrow is fired only if all inputs
% receive an event simultaneously. The arrow must have at
% least one input.

function o=erate(a,sizes_in)

	s.base=a;
	s.sizes_in=sizes_in;
	if nargin(a)<1, error('erate arrow must have at least 1 input'); end
	o=class(s,'erate',arrow(nargin(a),nargout(a)));
end
