Skip to content

Releases: elliotchance/pie

v2.4.0

17 Feb 18:20
4abd3ae
Compare
Choose a tag to compare
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

09 Jan 16:35
9f03773
Compare
Choose a tag to compare
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

12 Dec 16:14
ab43b76
Compare
Choose a tag to compare
Add First() and Last() in chain operation (#183)

This also improves example in the README

v2.1.0

16 Nov 21:42
3ba5af1
Compare
Choose a tag to compare
Added First() and Last()(#182)

Fixes #181

v2.0.1

22 Mar 18:05
c18f579
Compare
Choose a tag to compare
Cleanup README (#176)

A few minor adjustments after the v2.0.0 release.

v2.0.0

22 Mar 17:52
5757c16
Compare
Choose a tag to compare
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

06 Oct 17:51
e09c671
Compare
Choose a tag to compare
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

06 Apr 19:03
1d6cd85
Compare
Choose a tag to compare
Fix Diff slice bounds out of range (#170)

Fixes #169

v1.38.1

04 Feb 23:11
a3a59d9
Compare
Choose a tag to compare
if `typeSpec` elt is interface `zeroValue` should be `nil` (#168)

v1.38.0

03 Oct 16:22
2a685ad
Compare
Choose a tag to compare
Add stddev (#164)

Issue #41