Skip to content

v1.1.0

Latest
Compare
Choose a tag to compare
@SandroMaglione SandroMaglione released this 13 Aug 11:13
· 14 commits to main since this release
6757450
  • Improved performance of some iterable based functions in Iterable and Map extension (thanks to @lrhn 馃帀)

  • Added lookupEq and dropRight on Iterable extension

[].lookupEq(Eq.eqInt, 5) // None()
[1, 2, 3, 4].lookupEq(Eq.eqInt, 5) // None()
[1, 2, 3, 4].lookupEq(Eq.eqInt, 3) // Some(3)
[1, 6, 4, 3, 2].lookupEq(Eq.by((n) => n % 3, Eq.eqInt), 0) // Some(6)

[1, 2].dropRight(3) // []
[1, 2, 3, 4].dropRight(1) // [1, 2, 3]
  • Added lookupKeyEq on Map extension
<String, int>{'a': 1, 'b': 2, 'c': 3, 'd': 4}.lookupKeyEq(Eq.eqString, 'b'); // Some('b')
<String, int>{'a': 1, 'b': 2, 'c': 3, 'd': 4}.lookupKeyEq(Eq.eqString, 'e'); // None()