We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I find myself doing this often:
local numbers = { 1, 4, 2, 3, 1, 1, 3 } local ones = Sift.Array.filter(numbers, function(number) return number == 1 end) local noOnes = Sift.Array.filter(numbers, function(number) return number ~= 1 end)
It would be nice to have a partition/split method to separate data:
local numbers = { 1, 4, 2, 3, 1, 1, 3 } local ones, noOnes = Sift.Array.partition(numbers, function(number) return number == 1 end) print(ones) -- { 1, 1, 1 } print(noOnes) -- { 4, 2, 3, 3 }
It could also apply for Set and Dictionary
Set
Dictionary
The text was updated successfully, but these errors were encountered:
Implement Array.partition (closes #18)
Array.partition
2f376ce
No branches or pull requests
I find myself doing this often:
It would be nice to have a partition/split method to separate data:
It could also apply for
Set
andDictionary
The text was updated successfully, but these errors were encountered: