-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ToList
class
#123
Comments
What do you think are the pros and cons of this approach vs modifying |
Pro: Doesn't break the entire ecosystem |
@natefaubion do you think we should not do this, for the same reason as the one you gave in purescript/purescript-foldable-traversable#69 (comment) ? |
I think that |
To clarify, lets take
I consider this naive because foldrLazy requires a Lazy constraint, and you can just lift anything into
Which, while ugly, is totally safe and still short circuits. |
I would actually probably even prefer something like
As opposed to |
That makes sense. This feels like something I'd like to prototype outside of core first, probably. |
Just for comparison, here are some benches for
|
The times obviously improve for everything except |
As an alternative to purescript/purescript-foldable-traversable#69, we could add a class:
Where
The text was updated successfully, but these errors were encountered: