Re: Typo in 'unfold' types
John Cowan 04 May 2026 00:01 UTC
On Sun, May 3, 2026 at 3:58 PM Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz> wrote:
> If this is intended behavior, then the type should really be
>
> unfold p f g seed [tail-gen] -> object.
I believe (though I wasn't involved in any way) that the whole purpose
of the tail-gen argument was to allow the creation of dotted lists
(which as we have discussed are everything except proper and circular
lists). The last cdr of a dotted list is often called the tail of the
list, so I think the name "tail-gen" was intended to provide the tail
in this sense.
I think we should seek to get the types of `unfold` and `unfold-right`
corrected along these lines.