split icon indicating copy to clipboard operation
split copied to clipboard

splitPlaces ignores trailing 0-length lists

Open byorgey opened this issue 7 years ago • 0 comments

I've found that splitPlaces does not take into account 0 length splits at the end of a list which tends to cause issues when zipping together nested lists. For example:

λ map length [[1],[],[2,3],[],[]][1,0,2,0,0]

λ splitPlaces [1,0,2,0] [1,2,3] [[1],[],[2,3]] -- There is no trailing empty lists here

(Imported from https://hub.darcs.net/byorgey/split/issue/3)

byorgey avatar May 15 '17 19:05 byorgey