% alatch - Arrow which produces the value in the last event received.
%
% alatch :: A -> arrow( {box(A)}, {A}, A).
function o=alatch(x0)
	o=loop(@upd,@(sz)x0);
end

function [y,s]=upd(x,s)
	if iscell(x) && ~isempty(x), s=x{end}; end
	y=s;
end
