Mercurial > hg > ishara
view general/funutils/funseq.m @ 27:5de03f77dae1
Added documentation about types and revised arrow type specifications.
author | samer |
---|---|
date | Sat, 19 Jan 2013 14:22:09 +0000 |
parents | fbc0540a9208 |
children |
line wrap: on
line source
function h=funseq(varargin) % funseq - Constructs sequential application of several functions % % h=funseq(f,...,g) % % returns the function h such that h(...) = g(...) but % all functions are evaluated in order. fns=varargin; h=@seq; function varargout=seq(varargin) for i=1:length(fns)-1 feval(fns{i},varargin{:}); end if nargout==0, feval(fns{end},varargin{:}); else [varargout{1:nargout}]=feval(fns{end},varargin{:}); end end end