Open gcanti opened 1 year ago
What about these.
**tap***
tapEither
(chainFirstEitherK / chainFirstEitherKW) #1864
IOEither
TaskEither
ReaderEither
ReaderTaskEither
IOOption
Option
TaskOption
StateReaderTaskEither
tapIO
(chainFirstIOK)
IOOption
Task
TaskOption
IOEither
ReaderIO
ReaderTask
TaskEither
ReaderTaskEither
StateReaderTaskEither
tapReaderEither
(chainFirstReaderEitherK / chainFirstEitherKW)
ReaderTaskEither
tapReaderIO
(chainFirstReaderIOK)
ReaderTask
ReaderTaskEither
tapReader
(chainFirstReaderK / chainFirstIReaderKW)
ReaderIO
ReaderTask
ReaderEither
ReaderTaskEither
StateReaderTaskEither
tapReaderTask
(chainFirstReaderTaskK)
ReaderTaskEither
tapTaskEither
(chainFirstTaskEitherK / chainFirstITaskEitherKW)
ReaderTaskEither
tapTask
(chainFirstTaskK)
TaskOption
ReaderTask
TaskEither
ReaderTaskEither
StateReaderTaskEither
**tapError** - there are TE.orElseFirstTaskK
, TE.orElseFirstIOK
and IOE.orElseFirstIOK
, would it make sense to add remaining `tapError` combinators for types with errors?
IMO it always makes sense since you get dual APIs and also a better name (tapError vs orElseFirst)
as
and asUnit
would be also nice, hm?
Either
IO
IOEither
IOOption
Option
Reader
ReaderEither
ReaderIO
ReaderTask
ReaderTaskEither
Does it make sense to implement as
and asUnit
for any data type having a functor instance or is there rule / law / practical reasoning for not having it for some data types? I see, in the effect/data
, it's not implemented for arrays or Identity
. What about State
for example?
No, there isn't a specific reason, they just don't seem very useful in the case of ReadonlyArray and Identity
Are struct
and tuple
from Product considered stable enough to be backported?
Are struct and tuple from Product considered stable enough to be backported?
@sukovanej I think it's better to wait a little longer
p.s. Anything else you would like to add? otherwise we could release 2.16
Ok. I don't have anything right now.
How about tap
for Identity
? For me it feels a little bit awkward to write O.tap
and I.chainFirst
.
Don't know if you now want to introduce asVoid
or whether unit remains the terminology in fp-ts?
The following features can be backported without breaking changes:
2.14
flatMap
(aka chain / chainW) https://github.com/gcanti/fp-ts/pull/18492.15
flatMap*
(aka chain*K / chain*KW) https://github.com/gcanti/fp-ts/pull/1862tap
(aka chainFirst / chainFirstW) https://github.com/gcanti/fp-ts/pull/1857tapError
(aka orElseFirst / orElseFirstW) https://github.com/gcanti/fp-ts/pull/1858LazyArg
(aka Lazy) https://github.com/gcanti/fp-ts/pull/18562.16
tapEither
(dual) (akachainFirstEitherK
/chainFirstEitherKW
) https://github.com/gcanti/fp-ts/pull/1864tapIO
(dual) (akachainFirstIOK
) https://github.com/gcanti/fp-ts/pull/1865as
/asUnit
https://github.com/gcanti/fp-ts/pull/1867tapTask
(dual) (akachainFirstTaskK
) https://github.com/gcanti/fp-ts/pull/1869mapError
(dual) (akamapLeft
) https://github.com/gcanti/fp-ts/pull/1870mapBoth
(dual) (akabimap
) https://github.com/gcanti/fp-ts/pull/1872tapReader
(dual) (akachainFirstReaderK
/chainFirstIReaderKW
) https://github.com/gcanti/fp-ts/pull/1871tapReaderEither
(dual) (akachainFirstReaderEitherK
/chainFirstEitherKW
) https://github.com/gcanti/fp-ts/pull/1873tapReaderIO
(dual) (akachainFirstReaderIOK
) https://github.com/gcanti/fp-ts/pull/1873tapReaderTask
(dual) (akachainFirstReaderTaskK
) https://github.com/gcanti/fp-ts/pull/1873tapTaskEither
(dual) (akachainFirstTaskEitherK
/chainFirstTaskEitherKW
) https://github.com/gcanti/fp-ts/pull/1873flatMapReaderTask
(dual) (akachainReaderTaskK
/chainReaderTaskKW
) https://github.com/gcanti/fp-ts/pull/1874flatMapTaskEither
(dual) (akachainTaskEitherK
/chainTaskEitherKW
) https://github.com/gcanti/fp-ts/pull/1874flatMapIO
(dual) (akachainIOK
) https://github.com/gcanti/fp-ts/pull/1874Option.orElse
(dual) (akaalt
/altW
) https://github.com/gcanti/fp-ts/pull/1868flatMapTask
(dual) (akachainTaskK
) https://github.com/gcanti/fp-ts/pull/1876flatMapReader
(dual) (akachainReaderK
/chainReaderKW
) https://github.com/gcanti/fp-ts/pull/1876flatMapReaderIO
(dual) (akachainReaderIOK
/chainReaderIOKW
) https://github.com/gcanti/fp-ts/pull/1879flatMap*
(akachain*K
/chain*KW
) https://github.com/gcanti/fp-ts/pull/18802.17
TODO (Feel free to add a comment to this issue if you want to suggest any other backporting)