Mercurial > hg > ishara
view general/funutils/apply.m @ 13:03694e5c8365
Reorganised some high order list functions to correct class-based method dispatch; fixed some docs.
author | samer |
---|---|
date | Wed, 16 Jan 2013 12:12:34 +0000 |
parents | fbc0540a9208 |
children |
line wrap: on
line source
function varargout=apply(fn,args) % apply - Apply function to list (cell array) of arguments % % apply :: % (A:typelist(N)->B:typelist(M)) ~'function with N inputs and M outputs', % cell { A:typelist(N) } ~'cell array with N elements of types AX' % -> B{1}, ..., B{M} ~'M return values of types B{1} to B{M}'. [varargout{1:max(1,nargout)}] = fn(args{:});