Skip to content
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

fix: array.FindIndex #4

Merged
merged 2 commits into from
Aug 10, 2022

Conversation

xylin123
Copy link
Contributor

修复:

  1. type a = array.FindIndex<[1,2,3], undefined> // type a = 3 预期为 -1;
  2. type a = array.Find<[1,2,3], undefined> 时 返回 undefined 预期是 null

原因及处理:终止条件 Offset 应为 T['length'] 而不是 T['length'] + 1

优化

  1. 优化 Some/Every 递归逻辑,符合条件时即刻退出。

@xylin123
Copy link
Contributor Author

提供一个递归思路实现的 Sort1 ,支持排序的元组长度为30个左右

@kawayiLinLin kawayiLinLin merged commit 61c92ee into kawayiLinLin:master Aug 10, 2022
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.

None yet

2 participants