-
Notifications
You must be signed in to change notification settings - Fork 0
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
Expose Cats/Scalaz Foldable instances for mutable Java structures #45
base: master
Are you sure you want to change the base?
Conversation
::sigh:: I suppose if I'm enforcing issue/branch/PR discipline on myself I ought to include appropriate tests with each PR. |
Note to self Complete means we need the Scalaz version too. Tested means figuring out how to run the laws provided by Cats and Scalaz against instances coming from solid implementations of the hidden traits. THEN we need to figure out laws (or at least reusable tests) for classes that implement the hidden traits. |
Using cats.laws.discipline.FoldableTests (Cats' Foldable laws) and a check that the resulting foldable has the same elements as are passed into it.
Got some tests in place for JListFoldable as cats.Foldable. Now need to implement Scaalz Foldable and figure out how to run the Scalaz tests in the various Scalaz integration libraries. |
After getting the Scalaz integration up we'll need to write some tests ensuring that the RandomAccess optimizations, namely overriding get(int) and size, work and are being used. |
The Scala standard library has foldLeft for iterators so I'm deferring to it now. Also the trait names were a bit copy-pasta'ed; fixed.
Addresses issue #17