unfold

Stephen Weeks MLton@sourcelight.com
Mon, 30 Jul 2001 14:57:41 -0700


I think a more natural signature for unfold for lists is

      val unfold: 'a * ('a -> ('b * 'a) option) -> 'b t

instead of

      val unfold: int * 'a * ('a -> 'b * 'a) -> 'b t

The reason is that there is no reason to force the caller to know the final
size, since it doesn't help unfold any (and might force the caller to do
something expensive).