Skip to content

Replace remaining non-TCO implementations#100

Open
lue-bird wants to merge 3 commits intoelmcraft:masterfrom
lue-bird:remove-non-TCO
Open

Replace remaining non-TCO implementations#100
lue-bird wants to merge 3 commits intoelmcraft:masterfrom
lue-bird:remove-non-TCO

Conversation

@lue-bird
Copy link
Copy Markdown
Collaborator

@lue-bird lue-bird commented Mar 22, 2026

Replaces the remaining few functions not qualifying for TCO using List.foldr since they were all following the shape

recursive list =
    case list of
        ...
        x :: xs -> ... recursive xs

The resulting implementations will be slightly slower but stack safe, similar to #89.
Also includes small doc comment example fixes.

@miniBill
Copy link
Copy Markdown
Collaborator

I'll take slightly slower over not stack safe every time. We can make them faster after they're safe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants