% emerge - Arrow to merge event inputs
%
% emerge :: N:natural ~'number of inputs' 
% -> arrow({[N]->boxed(A)},{boxed(A)},empty).
%
% Inputs are event streams, ie values of type boxed(A),
% which are cell arrays of values of type A.
% Output is an event stream consisting of all events
% merged into one stream. If multiple events arrive
% at one time, the output cell array will contain more
% than one value.
function o=emerge(nin)
	o=arr(@merge); 
	function y=merge(varargin), y=cat(2,varargin{1:nin}); end
end
