Wed Sep 5 22:40:42 CEST 2007
monads and map
so.. what about writing a macro for this 'generalized map - not quite
a real monad - collect results in a list' pattern?
i guess this is just unfold..
no it's not..
got this macro + usage:
(let next ((l '())
(next (cons result-expr l)
(define (@unfold-iterative stream)
but it looks just ugly, so i'm going to forget about it.. i guess, if
this pattern shows up in code, it means i'm not using a proper hof.
what about writing it as a hof instead of a macro?
i think i'm getting a bit tired.. just reinvented unfold.. no, it's