[MLton] Optional Arguments and FRU
Wed, 24 Aug 2005 03:02:18 +0300
Quoting Matthew Fluet <email@example.com>:
> > However, you are right in that replacing CPS with composition/list+fold
> > does also somewhat simplify the technique. The need for a terminator
> > ($) vanishes, which is a minor technical advantage.
> The terminator is still there: nil in the list case, and the <| defs in
> the composition case (or in the syntactic bracketing of the composition if
> the <| defs is pushed into the definition).
Hmm... That's a good point. Well, I guess the difference is then that
the notation using composition is (or can be) symmetric (due to the
associativity of o) while the syntax using CPS is fundamentally
asymmetric. Abstractly, the notations reduce to:
o: (p1 o ... o pN)
CPS: B p1 ... pN E (where B <> E necessarily)