Mercurial > hg > ishara
view general/algo/bracket_it.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 | f7fb679637ff |
children |
line wrap: on
line source
% bracket_it - Bracket iterator with pre and post actions % % bracket_it :: % iterator(A) ~'an iterator', % (A=>void) ~'action to perform before calling iterator', % (A=>void) ~'action to perform after calling iterator' % -> iterator(A) ~'new iterator incorporating pre and post actions'. function it=bracket_it(it,pre,post) f=it{1}; it{1}=@bf; function x=bf(x), pre(x); x=f(x); post(x); end end