[MLton] printf via fold
Vesa Karvonen
vesa.karvonen@cs.helsinki.fi
Sun, 11 Sep 2005 00:52:34 +0300
Quoting Stephen Weeks <sweeks@sweeks.com>:
> Nice. One minor simplification is to remove the $ from step0.
>
> fun step0 h = Fold.step0 (either (fn v => eval (fn () => h v), RIGHT))
Sometimes I wish there was a compiler warning (or hint) to tell me
when eta-reduction can be applied. (It is not high on my wish list,
though.)
> > (The version I have in my utility library is slightly different, though.
> > I don't use a {finish, handler} record and I use currying in step1.)
>
> Darn. I thought we agreed that currying in step1 doesn't make sense
> (as opposed to in the MakeFold functions, where it does).
Hmm... You are quite right. I've switched to using tupled functions.
-Vesa Karvonen