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

Add scanl/scanr/scanl1/scanr1 #90

Open
zliu41 opened this issue Jul 19, 2021 · 1 comment · May be fixed by #92
Open

Add scanl/scanr/scanl1/scanr1 #90

zliu41 opened this issue Jul 19, 2021 · 1 comment · May be fixed by #92

Comments

@zliu41
Copy link

zliu41 commented Jul 19, 2021

These functions seem useful:

scanl :: SNatI n => (b -> a -> b) -> b -> Vec n a -> Vec ('S n) b
scanr :: SNatI n => (a -> b -> b) -> b -> Vec n a -> Vec ('S n) b
scanl1 :: SNatI n => (a -> a -> a) -> Vec ('S n) a -> Vec ('S n) a
scanr1 :: SNatI n => (a -> a -> a) -> Vec ('S n) a -> Vec ('S n) a

Do you think they should be added?

@phadej
Copy link
Owner

phadej commented Jul 20, 2021

They could.

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

Successfully merging a pull request may close this issue.

2 participants