Comments (3)
Perhaps a chunkWithKeys
function that follows the toArray
/toArrayWithKeys
pattern? Or a chunkWithoutKeys
function to avoid breaking the existing chunk
function?
from iter.
Yeah, this is a problem. For iterator to array conversions we should not be keeping keys by default, as this causes issues very often. I like your suggestion of adding a $preserveKeys
flag defaulting to false
(even if this is a minor BC break).
from iter.
Closed by #42.
from iter.
Related Issues (20)
- Feature: iter\empty or add limit to iter\count HOT 2
- Bug in iter\chain or PHP. HOT 4
- 1.6 Release HOT 2
- Version 2.0 HOT 12
- Pass key to map function HOT 7
- flatten and flatMap skip values on iterator_to_array HOT 1
- Explode-like iterable constructors HOT 2
- Function proposal - at/get() HOT 5
- Feature: Add generators support HOT 2
- Function slice() losing value after reach maximum index HOT 1
- Add typehints HOT 1
- Rename iter\fn to iter\func HOT 2
- Add Psalm annotations HOT 3
- \iter\map does not accept all kinds of callable? HOT 2
- Add a json_encode HOT 2
- IteratorAggregate not properly handled in toIter
- Feature req: something with semantics `array_usearch()` would have if it existed HOT 3
- Feature: searchKey HOT 1
- Feature proposal: add new function \iter\tap HOT 1
- `\iter\isEmpty()` can indirectly cause unexpected consumption from iterators in rare cases HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iter.