Mercurial > hg > ishara
view general/funutils/tail.m @ 42:ae596261e75f
Various fixes and development to audio handling
author | samer |
---|---|
date | Tue, 02 Dec 2014 14:51:13 +0000 |
parents | b1280319413e |
children |
line wrap: on
line source
% tail1 - Call function with tail recursion % % tail1 :: (A{1:N}->thunk(B{1:M}), A{1:N} -> B{1:M}. % % thunk(B{1:M}) ::= % exists C{1:L} . cell { C{1:L}->B{1:M}, cell { C{1:L} } } % | cell { {0}, cell { B{1:L} } } % | void -> B{1:M}. function varargout=feval_tail1(fn,varargin) ret=fn(varargin{:}); if ~isnumeric(ret{1}) [varargout{1:nargout}]=feval(ret{1},ret{2}{:}); else varargout=ret{2}(1:nargout); end end