Skip to content

Feature/overhaul lists#45

Merged
dan323 merged 8 commits intomasterfrom
feature/overhaul-lists
Feb 20, 2026
Merged

Feature/overhaul lists#45
dan323 merged 8 commits intomasterfrom
feature/overhaul-lists

Conversation

@dan323
Copy link
Copy Markdown
Owner

@dan323 dan323 commented Feb 20, 2026

No description provided.

2. Fill CORE_CONCEPTS.md
Copilot AI review requested due to automatic review settings February 20, 2026 19:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/Zipped to use InfiniteList#getHead() and adds Cons-optimized zipping behavior.
  • Adds docs/CORE_CONCEPTS.md and 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.

Comment thread CHANGELOG.md Outdated
Comment thread docs/CORE_CONCEPTS.md Outdated
dan323 and others added 4 commits February 20, 2026 23:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

@dan323 dan323 merged commit f7e1037 into master Feb 20, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants