Comments (3)
This seems very similar to List.Extra.groupsOfVarying
. Do you have some specific use-case in mind for which that function is not sufficient?
from list-extra.
I believe there are some slight differences between groupsOfVarying
and my proposed splitsAt
function. groupsOfVarying
specifies the length of each group while splitsAt
specifies the index of where the split should end. groupsOfVarying
can return a list of lists that doesn't necessarily include all elements in the original list while splitsAt
does include all elements in the original list.
I haven't tested splitsAt
with list of indices like [3,2,1]
or [1,1,1]
.
from list-extra.
Im not seeing the value in this function to be honest. Assuming good code practices were used, I dont know how you could end up in a circumstance where you could know which indices you want to split at without also having access to the elements you are trying to split.
from list-extra.
Related Issues (20)
- setAt wrong params HOT 2
- Next release HOT 1
- Proposal for more context in `groupWhile` HOT 3
- MIT LICENSE file does not match "BSD-3-Clause" in elm.json HOT 1
- Proposal for `combinations` HOT 2
- Argument order of `andMap` HOT 1
- proposal: Add findMap HOT 2
- isInfixOf returns incorrect result when a partial match is found before a complete match HOT 2
- groupByWhile seems unintuitive HOT 2
- Proposal for `windows` function(s) HOT 5
- code design thought HOT 1
- `groupWhen` and `groupWhenWithAcc` proposal/design question HOT 1
- Cycle 0 list = [] ? HOT 1
- Tail call optimiziations
- `groupsOfVarying` behaves inconsistently with groups of length `0`
- I downloaded the source code for elm-community/list-extra But it looks like the hash of the archive has changed since publication HOT 3
- groupsOf and friends can exceed maximum call stack size HOT 1
- Add a pad functions HOT 1
- Proposal for `toMaybeList` function HOT 2
- `unconsLast`
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 list-extra.