Cotton Hou

Results 58 comments of Cotton Hou

One thing I noticed from your implementation is allowing redefine existing keys, e.g. ```ts pipe( option.Do, option.apS('x', some(42)), option.apS('y', some(1337)), option.bindMap('y', ({ x, y }) => x * y), //

> However, I'd argue that this restriction is unnecessary for all of these methods as shadowing is a thing in "regular" do-notation. IMO, name shadowing from outer scope is reasonable...

I think it's `apS` from `Reader`'s `Do` notation, e.g: ```ts import { reader as R, readonlyArray as A, function as F, } from 'fp-ts'; const mk = F.pipe( R.Do, R.apS('take1',...

As mentioned by @ryota-ka, current `esm/` is invalid to be consumed by ESM natively, I think easiest fix would be change the default entry `'.'` to CommonJS-only (before the extensions...

Checked out with test [case][2] by [split][1] from **purescript-strings**: ```purescript assertEqual { actual: S.split (Pattern "") "" , expected: [] } ``` [1]: https://pursuit.purescript.org/packages/purescript-strings/5.0.0/docs/Data.String#v:split [2]: https://github.com/purescript/purescript-strings/blob/36493eee748bc35e2d4ecb09992f3c3eae42f4e8/test/Test/Data/String.purs#L82-L85

:trollface: https://github.com/denysdovhan/wtfjs#split-a-string-by-a-space

For example: `chainFirst` or `apFirst` from **TaskEither** doesn't require second be `void` on right part to be ignored later on, seems overly restricted by **bracket** here.

> I could argue that a type variable like that is useless, `unknown` would be equivalent. That's what I've had in mind while submitting the patch, however on second thought...

Apply same changes onto: - IOEither - TaskEither - ReaderTaskEither