Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Add Foldable and Functor instances for containers #19

Open
lukaszcz opened this issue Aug 21, 2024 · 1 comment
Open

Add Foldable and Functor instances for containers #19

lukaszcz opened this issue Aug 21, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@lukaszcz
Copy link
Collaborator

Now that we have Foldable and Functor traits, we could use for and map directly with the containers without converting them to/from lists.

@lukaszcz lukaszcz added the enhancement New feature or request label Aug 21, 2024
@lukaszcz
Copy link
Collaborator Author

I see Foldable is implemented for AVLTree by converting to list first. This conversion is unnecessary overhead (and it's significant with many traversals).

There seem to be no implementations for Functor or Foldable for Map.

@heueristik Since Set is an alias for AVLTree writing for (acc := acc0) (x in set) {..} just works without converting set to list manually first (it should work with the most recent version of the containers library at least)

@lukaszcz lukaszcz self-assigned this Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant