Skip to content

fix(fjl)!: land the behavioural review fixes from #150 on main - #153

Merged
elycruz merged 4 commits into
mainfrom
32-typing-list
Nov 3, 2026
Merged

elycruz merged 4 commits into
mainfrom
32-typing-list

Conversation

@elycruz

@elycruz elycruz commented Nov 3, 2026

Copy link
Copy Markdown
Member

Closes #122.

#150 was stacked on #149, with 32-typing-list as its base. #149 merged first, so #150 landed on that branch and never reached main. This PR carries it the rest of the way. main still has the old behaviour, including the old breakOnList, and #122 stayed open.

Changes

No new code. These are the commits already reviewed and merged in #150:

  • 89a25210 fix bugs and fill test gaps
  • b15537a3 align edge cases with Haskell and native
  • 3286ac86 pin Haskell laws for two list methods

See #150 for the full list of behaviour changes.

Verification

Merge order

Merge this first, then #151, which is being retargeted to main. #152 builds on both.

🤖 Generated with Claude Code

elycruz and others added 4 commits November 3, 2026 11:28
Fix bugs found reviewing `errorThrowing/`, `list/`, `number/`, `object/`,
and `string/`: `of`, `copy`, `mapObj`, `searchObj`, `lookup`, `isPrimitive`,
`isGeneratorFunction`, `isSubsequenceOf`, `subsequences`, `insert`, `take`,
`breakOnList`, `zipWithN`, and `randChar`.  Export `zip4`, which was missing
from `list/`.

Add tests for exports that had none, and drop the resolved `@todo`s.

BREAKING CHANGE: `isSubsequenceOf` now respects order, `breakOnList` returns
prefix then remainder, `take` returns `[]` for a negative count, and
`zipWithN` applies its operation for a single list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tive

Apply the 2.0 edge-case decisions from the review, and update the tests
that pinned the old behaviour.

BREAKING CHANGE: `all`, `and`, and `not` return `true` for empty lists.
`findIndices` and `elemIndices` return `[]` when nothing matches.  `isPrefixOf`,
`isInfixOf`, and `isSuffixOf` return `true` for an empty needle.  `inits('')`
returns `['']`.  `scanl` and `scanr` include the seed, and `scanr` now runs
from the `foldr` result to the seed; `scanl1` and `scanr1` follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test `isSubsequenceOf` against `subsequences`, and `breakOnList` against
`span`, the equivalences given in Haskell's `Data.List` docs.  Link those docs
from both methods.  No behaviour changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(fjl)!: fix bugs and fill test gaps from the behavioural review
@elycruz
elycruz merged commit 48bb053 into main Nov 3, 2026
3 checks passed
@elycruz
elycruz deleted the 32-typing-list branch November 3, 2026 18:23
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.

v2.0 - Implementations review

1 participant