Mercurial > hg > ishara
view general/funutils/map.m @ 9:45aaf9b2d7b0
Moved high-order sequence/list functions to @cell class.
author | samer |
---|---|
date | Mon, 14 Jan 2013 15:49:04 +0000 |
parents | e44f49929e56 |
children |
line wrap: on
line source
function y=map(f,x) % map - Map function over collection % % map :: (A->B), collection(A) -> collection(B). % % collection(A) ::= seq(A) | cells(A). if isempty(x), y=x; else error(sprintf('Cannot map over objects of class %s',class(x))); end