Repository navigation
fix(fjl)!: land the behavioural review fixes from #150 on main - #153
Merged
Merged
Conversation
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
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.
Closes #122.
#150 was stacked on #149, with
32-typing-listas its base. #149 merged first, so #150 landed on that branch and never reachedmain. This PR carries it the rest of the way.mainstill has the old behaviour, including the oldbreakOnList, and #122 stayed open.Changes
No new code. These are the commits already reviewed and merged in #150:
89a25210fix bugs and fill test gapsb15537a3align edge cases with Haskell and native3286ac86pin Haskell laws for two list methodsSee #150 for the full list of behaviour changes.
Verification
mainwith no conflicts, and the merged tree is identical to32-typing-list.tsc,jest,pnpm buildandeslinton the same code.Merge order
Merge this first, then #151, which is being retargeted to
main. #152 builds on both.🤖 Generated with Claude Code