Releases: elliotchance/pie
Releases · elliotchance/pie
v2.4.0
Adding Flat (#187) Flat flattens the two-dimensional slice into one-dimensional slice. Slices of zero-length are ignored. Examples: Flat([[100], [101, 102], [102, 103]]) => [100, 101, 102, 102, 103] Flat([nil, [101, 102], []]) => [101, 102] Co-authored-by: Dmytro Misik <[email protected]>
v2.3.0
Chunk (#184) Chunk splits the input and returns multi slices whose length equals chunkLength, except for the last slice which may contain fewer elements. Co-authored-by: morrisyang <[email protected]>
v2.2.0
Add First() and Last() in chain operation (#183) This also improves example in the README
v2.1.0
Added First() and Last()(#182) Fixes #181
v2.0.1
Cleanup README (#176) A few minor adjustments after the v2.0.0 release.
v2.0.0
Version 2: Rewrite with type parameterized functions for Go 1.18+ (#175) v2 is a complete rewrite so that code generation is no longer required - but we still have all the same benefits! There are some noteworthy changes: - There is no longer built-in types such as Float64s, Ints and Strings. To chain operations you can use the new `Of`, `OfOrdered` and `OfNumeric` functions. - Append(), Extend() and Len() were not moved over, since the way they would be used in v2 wouldn't provide any benefit over the standard syntax. It may make sense for these to exist on the `Of*` functions - but let's deal with that later. - First() and Last() have been removed since there is no way to substitute a zero value now. You will need to refactor these to use FirstOr() and LastOr() respectively. - Added String(), Float64() and Int() to help transform element types.
v1.39.0
Added DropWhile() and fixes issue in #173 (#174) Added DropWhile() function which is similar to `dropwhile()` function from `itertools` in Python. The `DropWhile()` function drops items from the slice while `f(item)` function returns `true`. Also used go generate in the README since go generate generate.go doesn't work from #173.
v1.38.2
Fix Diff slice bounds out of range (#170) Fixes #169
v1.38.1
if `typeSpec` elt is interface `zeroValue` should be `nil` (#168)
v1.38.0
Add stddev (#164) Issue #41