Conversation
2. Fill CORE_CONCEPTS.md
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the functional List implementation to support instance-based cons(...) and overhauls ZipApplicative zipping behavior (especially when zipping Cons-prefixed infinite lists), along with related test updates and new/updated documentation.
Changes:
- Refactors list construction toward
list.cons(head)and adjusts List factory return types (generate/repeat/nil). - Updates
ZipApplicative/Zippedto useInfiniteList#getHead()and addsCons-optimized zipping behavior. - Adds
docs/CORE_CONCEPTS.mdand updates README/CHANGELOG to reflect documentation structure and the list overhaul.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| example-functional/src/test/java/com/dan323/functional/ZipApplicativeTest.java | Adds coverage for zipping with Cons-prefixed infinite lists. |
| example-functional/src/test/java/com/dan323/functional/ListTest.java | Updates list construction to use instance cons(...). |
| example-functional/src/test/java/com/dan323/functional/ListFunctorTest.java | Updates list construction to use instance cons(...). |
| example-functional/src/main/java/com/dan323/functional/data/optional/Nothing.java | Adjusts hashCode() and removes unused import. |
| example-functional/src/main/java/com/dan323/functional/data/optional/Just.java | Adjusts hashCode() formula. |
| example-functional/src/main/java/com/dan323/functional/data/list/Zipped.java | Switches to InfiniteList internals and computes head via getHead(). |
| example-functional/src/main/java/com/dan323/functional/data/list/ZipApplicative.java | Reworks liftA2 branching, including Cons-specific zipping and Repeat optimization. |
| example-functional/src/main/java/com/dan323/functional/data/list/Repeat.java | Implements getHead() for the new InfiniteList head access pattern. |
| example-functional/src/main/java/com/dan323/functional/data/list/List.java | Adds instance cons(...), removes static cons(...), and narrows factory return types. |
| example-functional/src/main/java/com/dan323/functional/data/list/InfiniteList.java | Introduces getHead() and provides default head()/cons(...) implementations. |
| example-functional/src/main/java/com/dan323/functional/data/list/Generating.java | Implements getHead() and updates mapped infinite list internals. |
| example-functional/src/main/java/com/dan323/functional/data/list/FiniteList.java | Adds default instance cons(...). |
| example-functional/src/main/java/com/dan323/functional/data/list/Cons.java | Implements getHead() and adds zipBy(...) helper. |
| example-functional/src/main/java/com/dan323/functional/data/either/Left.java | Refactors equals(...) implementation style. |
| docs/CORE_CONCEPTS.md | Adds initial “Core Concepts” documentation page. |
| README.md | Simplifies/clarifies documentation index links. |
| CHANGELOG.md | Notes list zipping overhaul and adds a core concepts documentation entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.