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

Try simpler implementation for Fold.Window.minimum/maximum #1591

Closed
harendra-kumar opened this issue Apr 22, 2022 · 2 comments
Closed

Try simpler implementation for Fold.Window.minimum/maximum #1591

harendra-kumar opened this issue Apr 22, 2022 · 2 comments
Assignees
Milestone

Comments

@harendra-kumar
Copy link
Member

See composewell/streamly-statistics#6 (comment) . Use an implementation similar to writeLastN except that we fold the ring to a minimum element instead of an array. Compare the new implementation with the existing one for performance.

@harendra-kumar
Copy link
Member Author

This will also remove the dependency on deque.

@harendra-kumar
Copy link
Member Author

The signature can be changed to minimum :: (Monad m, Ord a) => Int -> Fold m a a.

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

2 participants