Functional programming in TypeScript
Polish
Resolved a RangeError where the maximum call stack size was exceeded when invoking chainWithIndex
, #1931
tapEither
(dual) (aka chainFirstEitherK
/ chainFirstEitherKW
) https://github.com/gcanti/fp-ts/pull/1864
tapIO
(dual) (aka chainFirstIOK
) https://github.com/gcanti/fp-ts/pull/1865
as
/ asUnit
https://github.com/gcanti/fp-ts/pull/1867
tapTask
(dual) (aka chainFirstTaskK
) https://github.com/gcanti/fp-ts/pull/1869
mapError
(dual) (aka mapLeft
) https://github.com/gcanti/fp-ts/pull/1870
mapBoth
(dual) (aka bimap
) https://github.com/gcanti/fp-ts/pull/1872
tapReader
(dual) (aka chainFirstReaderK
/ chainFirstIReaderKW
) https://github.com/gcanti/fp-ts/pull/1871
tapReaderEither
(dual) (aka chainFirstReaderEitherK
/ chainFirstEitherKW
) https://github.com/gcanti/fp-ts/pull/1873
tapReaderIO
(dual) (aka chainFirstReaderIOK
) https://github.com/gcanti/fp-ts/pull/1873
tapReaderTask
(dual) (aka chainFirstReaderTaskK
) https://github.com/gcanti/fp-ts/pull/1873
tapTaskEither
(dual) (aka chainFirstTaskEitherK
/ chainFirstTaskEitherKW
) https://github.com/gcanti/fp-ts/pull/1873
flatMapReaderTask
(dual) (aka chainReaderTaskK
/ chainReaderTaskKW
) https://github.com/gcanti/fp-ts/pull/1874
flatMapTaskEither
(dual) (aka chainTaskEitherK
/ chainTaskEitherKW
) https://github.com/gcanti/fp-ts/pull/1874
flatMapIO
(dual) (aka chainIOK
) https://github.com/gcanti/fp-ts/pull/1874
Option.orElse
(dual) (aka alt
/ altW
) https://github.com/gcanti/fp-ts/pull/1868
flatMapTask
(dual) (aka chainTaskK
) https://github.com/gcanti/fp-ts/pull/1876
flatMapReader
(dual) (aka chainReaderK
/ chainReaderKW
) https://github.com/gcanti/fp-ts/pull/1876
flatMapReaderIO
(dual) (aka chainReaderIOK
/ chainReaderIOKW
) https://github.com/gcanti/fp-ts/pull/1879
flatMap*
(aka chain*K
/ chain*KW
) https://github.com/gcanti/fp-ts/pull/1880
New Feature
function
LazyArg
tap
(dual) (aka chainFirst
/ chainFirstW
) to:
Either
IO
IOEither
IOOption
Option
Reader
ReaderEither
ReaderIO
ReaderTask
ReaderTaskEither
State
StateReaderTaskEither
Task
TaskEither
TaskOption
tapError
(dual) (aka orElseFirst
/ orElseFirstW
) to:
IOEither
ReaderEither
ReaderTaskEither
TaskEither
flatMapNullable
(dual) to:
Either
IOEither
ReaderEither
ReaderTaskEither
StateReaderTaskEither
TaskEither
flatMapOption
(dual) to:
Either
IOEither
ReaderEither
ReaderTaskEither
StateReaderTaskEither
TaskEither
liftNullable
to:
Either
IOEither
ReaderEither
ReaderTaskEither
StateReaderTaskEither
TaskEither
liftOption
to:
Either
IOEither
ReaderEither
ReaderTaskEither
StateReaderTaskEither
TaskEither
flatMapEither
(dual) to:
IOEither
ReaderEither
ReaderTaskEither
TaskEither
Array
flatMap
NonEmptyArray
flatMap
ReadonlyArray
flatMap
ReadonlyNonEmptyArray
flatMap
New Feature
flatMap
to
Either
IOEither
Reader
ReaderEither
ReaderIO
ReaderTask
ReaderTaskEither
StateReaderTaskEither
TaskEither
NonEmptyArray
ReadonlyNonEmptyArray
Tree
Array
Identity
IO
IOOption
Option
ReadonlyArray
State
Task
TaskOption
the gist is:
chain
/ chainW
with flatMap
flatMap
in 2 ways: pipe(ma, flatMap(f))
(data-last, aka pipeable) or flatMap(ma, f)
(data-first)chainOptionKW
, #1846 (@DenisFrezzato)ReaderIO
, #1738 (@sukovanej)let
helpers, #1725 (@Punie)Alternative
getAlternativeMonoid
, #1717 (@willheslam)function
flip
is now curried, #1748 (@thewilkybarkid)pipeable
alt
ap
bimap
chain
compose
contramap
extend
filter
filterMap
filterMapWithIndex
filterWithIndex
foldMap
foldMapWithIndex
map
mapLeft
mapWithIndex
partition
partitionMap
partitionMapWithIndex
partitionWithIndex
promap
reduce
reduceRight
reduceRightWithIndex
reduceWithIndex
ReaderTask
ReaderIO
constructors/combinators, #1773 (@thewilkybarkid)ReaderTaskEither
ReaderIO
constructors/combinators, #1774 (@thewilkybarkid)TaskEither
chainTaskOptionKW
, #1744 (@AmirabbasJ)FromIO
chainIOK
FromTask
chainTaskK
chainFirstTaskK
Whiterable
FilterE1
TheseT
both
Either
apFirstW
apSecondW
IOEither
apFirstW
apSecondW
Reader
apFirstW
apSecondW
ReaderEither
apFirstW
apSecondW
ReaderTaskEither
apFirstW
apSecondW
StateReaderTaskEither
apFirstW
apSecondW
TaskEither
apFirstW
apSecondW
Apply
ap
overloadings, #1721 (@waynevanson)Either
exists
(@gcanti)ReadonlyRecord
fromEntries
return type, closes #1745 (@gcanti)TaskEither
fromPredicate
signature (@gcanti)These
fromPredicate
(@gcanti)exists
(@gcanti)Traversable
Writer
getChain
requires a Semigroup
instead of a Monoid
(@gcanti)function
flip
function, #1748 (@thewilkybarkid)How to install:
npm install fp-ts@rc
exports
field: move ./*
to the end, closes #1786 (@gcanti)How to install:
npm install fp-ts@rc
of
functions (@gcanti)Either
exists
(@gcanti)TaskEither
fromPredicate
signature (@gcanti)These
fromPredicate
(@gcanti)exists
(@gcanti)How to install:
npm install fp-ts@rc
ReaderTask
ReaderIO
constructors/combinators, #1773 (@thewilkybarkid)ReaderTaskEither
ReaderIO
constructors/combinators, #1774 (@thewilkybarkid)