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

Unreachable branch in splitsAt #114

Open
qrpnxz opened this issue Jul 23, 2022 · 1 comment
Open

Unreachable branch in splitsAt #114

qrpnxz opened this issue Jul 23, 2022 · 1 comment

Comments

@qrpnxz
Copy link

qrpnxz commented Jul 23, 2022

| n <= 0 = Return stream
| otherwise = case stream of
Return r -> Return (Return r)
Effect m -> Effect (fmap (loop n) m)
Step fs -> case n of
0 -> Return (Step fs)

This last line looks unreachable.

@chessai
Copy link
Member

chessai commented Apr 23, 2023

Good catch!
That 0 -> Return (Step fs) line should just be removed.

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

No branches or pull requests

2 participants