Mercurial > hg > ishara
view general/funutils/map.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 | 45aaf9b2d7b0 |
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