Releases
v0.3.0
Refactoring, renaming, and bugfixes
mlms13
released this
19 Apr 00:31
v0.3.0
At a Glance
IO got some testing and bugfixes courtesy of @johnhaley81 and @andywhite37
Better interop with Js.Promise
catchError
should work better for Async
now
@mlms13 refactored the List and Array modules
More code is reused (by deriving functionality from Relude_Foldables
)
Naming and signatures are more consistent across modules
Array docs exist, and take
and drop
work more predictably with negatives (h/t @jdeisenberg )
🚨 Breaking Changes 🚨
In both Relude.List and Relude.Array:
take
and drop
are now takeExactly
and dropExactly
takeUpTo
and dropUpTo
are now take
and drop
In Relude.List:
removeBy
and remove
are now removeFirstBy
and removeFirst
List.sumFloat
is now List.Float.sum
List.String.map
is now Relude.String.mapChars
containsF
, indexOfF
, sortF
are now containsBy
, etc
Relude_ListF
is gone, just use Relude.List
instead
Relude.List.Sequence
(used internally by NonEmpty
) is no longer public
Nested typeclass modules (e.g Relude.List.Option.Traversable
) have been removed (for now?)
In Relude.Array:
Removed Array.one
(use Array.pure
instead)
Removed Array.mkString
(use Array.String.joinWith
instead)
Rename several functions to ...By
:
contains
is now containsBy
indexOf
is now indexOfBy
sort
is now sortBy
distinct
is now distinctBy
In Relude.String
replaceAll
is now replaceEach
✨ New Things ✨
In both Relude.List and Relude.Array
minBy
, min
, maxBy
, and max
functions
In Relude.List:
List.Result.sequence: list(Belt.Result.t('a, 'e)) => Belt.Result.t(list('a), 'e)
List.Float
now matches List.Int
with functions for contains,
sort,
sum,
product`, and more
In Relude.Array:
Array.void
, Array.flap
, Array.map2
(up to map5
) from Array.Monad
Array.countBy
from Array.Foldable
Array.sort
(which uses an ORD
module)
Array.contains
, Array.indexOf
, and Array.distinct
(which use an EQ
module)
Array.fold
and Array.intercalate
(which use a MONOID
module)
Array.shuffle
which returns a copy (unlike shuffleInPlace
)
Array.removeFirst
, Array.removeFirstBy
, Array.removeEach
, Array.removeEachBy
Add submodules (e.g. Array.String
, Array.Int
, etc) to match the List
submodules
In Relude.String:
removeFirst
and removeEach
You can’t perform that action at this time.