Mercurial > hg > ishara
diff general/funutils/@function_handle/and.m @ 39:c388f1c70669
Updated documentation and fixed some bugs in function algebra
author | samer |
---|---|
date | Tue, 29 Jan 2013 17:02:00 +0000 |
parents | 9d24b616bb06 |
children | ae596261e75f |
line wrap: on
line diff
--- a/general/funutils/@function_handle/and.m Tue Jan 29 15:59:01 2013 +0000 +++ b/general/funutils/@function_handle/and.m Tue Jan 29 17:02:00 2013 +0000 @@ -1,4 +1,4 @@ -% and - function combinator, f&g (...) = f(...); return g(...) +% and - sequential call function combinator % % and :: % (A{:} => B{:}), @@ -6,11 +6,14 @@ % -> (A{:} => C{:}). % % and :: -% (A{1:N} => B{:}), -% (A{1:N} => C{1:M}), +% (A{:} => B{:}), +% (A{:} => C{:}), % N:natural, % M:natural % -> (A{1:N} => C{1:M}). +% +% f&g == and(f,g) is a function which first calls f with given arguments, +% discarding return values, then calls g with arguments returning result. function h=and(f,g,nin,nout) if nargin<4, nout=nargout(g); end if nargin<3, nin=nargin(g); end