Skip to content
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

ZipList is Bind #219

Open
worldmaker18349276 opened this issue Aug 2, 2024 · 1 comment
Open

ZipList is Bind #219

worldmaker18349276 opened this issue Aug 2, 2024 · 1 comment

Comments

@worldmaker18349276
Copy link

instance zipListIsNotBind
:: Fail (Text """
ZipList is not Bind. Any implementation would break the associativity law.
Possible alternatives:
Data.List.List
Data.List.Lazy.List
""")
=> Bind ZipList where
bind = unsafeCrashWith "bind: unreachable"

ZipList is Bind, in which join is just diagonal. It's also Monad and MonadPlus.

Example: https://try.purescript.org/?gist=4888527a78d71d12df75fa628acd4719

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

No branches or pull requests

1 participant