@fncts/base 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_cjs/collection/Iterable/api/traverseConc.cjs +16 -21
- package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -1
- package/_cjs/collection/compat/Record/instances.cjs +67 -16
- package/_cjs/collection/compat/Record/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/api.cjs +9 -12
- package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/definition.cjs +41 -43
- package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Dictionary/definition.cjs +2 -4
- package/_cjs/collection/immutable/Dictionary/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/api.cjs +26 -29
- package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/definition.cjs +15 -17
- package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +136 -153
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs +10 -12
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs +11 -9
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +21 -22
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs +3 -9
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +8 -2
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/RoseTree/definition.cjs +13 -15
- package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/api.cjs +8 -12
- package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/definition.cjs +11 -13
- package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
- package/_cjs/collection/weak/IterableWeakMap.cjs +51 -2
- package/_cjs/collection/weak/IterableWeakMap.cjs.map +1 -1
- package/_cjs/collection/weak/IterableWeakSet.cjs +59 -7
- package/_cjs/collection/weak/IterableWeakSet.cjs.map +1 -1
- package/_cjs/control/Eval/api.cjs +9 -3
- package/_cjs/control/Eval/api.cjs.map +1 -1
- package/_cjs/control/Eval/definition.cjs +0 -7
- package/_cjs/control/Eval/definition.cjs.map +1 -1
- package/_cjs/control/Eval/instance.cjs +6 -0
- package/_cjs/control/Eval/instance.cjs.map +1 -1
- package/_cjs/control/Z/api.cjs +16 -14
- package/_cjs/control/Z/api.cjs.map +1 -1
- package/_cjs/control/Z/definition.cjs +9 -14
- package/_cjs/control/Z/definition.cjs.map +1 -1
- package/_cjs/control/Z/instances.cjs +6 -0
- package/_cjs/control/Z/instances.cjs.map +1 -1
- package/_cjs/control/Z/runtime.cjs +15 -13
- package/_cjs/control/Z/runtime.cjs.map +1 -1
- package/_cjs/data/Const/definition.cjs +0 -7
- package/_cjs/data/Const/definition.cjs.map +1 -1
- package/_cjs/data/Const/instances.cjs +7 -5
- package/_cjs/data/Const/instances.cjs.map +1 -1
- package/_cjs/data/Datum/api.cjs +479 -0
- package/_cjs/data/Datum/api.cjs.map +1 -0
- package/_cjs/data/Datum/definition.cjs +142 -0
- package/_cjs/data/Datum/definition.cjs.map +1 -0
- package/_cjs/data/Datum/instances.cjs +69 -0
- package/_cjs/data/Datum/instances.cjs.map +1 -0
- package/_cjs/data/DatumEither/api.cjs +365 -0
- package/_cjs/data/DatumEither/api.cjs.map +1 -0
- package/_cjs/data/DatumEither/definition.cjs +9 -0
- package/_cjs/data/DatumEither/definition.cjs.map +1 -0
- package/_cjs/data/DecodeError/definition.cjs +3 -3
- package/_cjs/data/DecodeError/definition.cjs.map +1 -1
- package/_cjs/data/Decoder/definition.cjs +3 -10
- package/_cjs/data/Decoder/definition.cjs.map +1 -1
- package/_cjs/data/Either/api.cjs +21 -5
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/definition.cjs +3 -10
- package/_cjs/data/Either/definition.cjs.map +1 -1
- package/_cjs/data/Either/instances.cjs +25 -23
- package/_cjs/data/Either/instances.cjs.map +1 -1
- package/_cjs/data/EitherT/api.cjs +106 -0
- package/_cjs/data/EitherT/api.cjs.map +1 -0
- package/_cjs/data/EitherT/definition.cjs +9 -0
- package/_cjs/data/EitherT/definition.cjs.map +1 -0
- package/_cjs/data/Environment/api.cjs +15 -14
- package/_cjs/data/Environment/api.cjs.map +1 -1
- package/_cjs/data/Environment/definition.cjs.map +1 -1
- package/_cjs/data/Identity/api.cjs +3 -1
- package/_cjs/data/Identity/api.cjs.map +1 -1
- package/_cjs/data/Identity/definition.cjs +2 -4
- package/_cjs/data/Identity/definition.cjs.map +1 -1
- package/_cjs/data/Identity/instances.cjs +6 -0
- package/_cjs/data/Identity/instances.cjs.map +1 -1
- package/_cjs/data/Intervals.cjs +292 -0
- package/_cjs/data/Intervals.cjs.map +1 -0
- package/_cjs/data/Maybe/api.cjs +3 -1
- package/_cjs/data/Maybe/api.cjs.map +1 -1
- package/_cjs/data/Maybe/definition.cjs +11 -13
- package/_cjs/data/Maybe/definition.cjs.map +1 -1
- package/_cjs/data/Maybe/instances.cjs +13 -11
- package/_cjs/data/Maybe/instances.cjs.map +1 -1
- package/_cjs/data/Newtype.cjs +3 -5
- package/_cjs/data/Newtype.cjs.map +1 -1
- package/_cjs/data/Struct/definition.cjs +2 -4
- package/_cjs/data/Struct/definition.cjs.map +1 -1
- package/_cjs/data/Zipped.cjs +55 -0
- package/_cjs/data/Zipped.cjs.map +1 -0
- package/_cjs/data/function/api.cjs +10 -0
- package/_cjs/data/function/api.cjs.map +1 -1
- package/_cjs/data/object/instances.cjs +9 -1
- package/_cjs/data/object/instances.cjs.map +1 -1
- package/_cjs/optics/Optional/definition.cjs +4 -6
- package/_cjs/optics/Optional/definition.cjs.map +1 -1
- package/_cjs/optics/Traversal/api/compose.cjs +1 -1
- package/_cjs/optics/Traversal/api/compose.cjs.map +1 -1
- package/_cjs/optics/Traversal/api/fromTraversable.cjs +1 -1
- package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -1
- package/_cjs/optics/Traversal/definition.cjs +3 -3
- package/_cjs/optics/Traversal/definition.cjs.map +1 -1
- package/_cjs/typeclass/Alt.cjs +0 -7
- package/_cjs/typeclass/Alt.cjs.map +1 -1
- package/_cjs/typeclass/ApplicativeExcept.cjs +9 -35
- package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
- package/_cjs/typeclass/Apply.cjs +39 -66
- package/_cjs/typeclass/Apply.cjs.map +1 -1
- package/_cjs/typeclass/Chain.cjs +6 -28
- package/_cjs/typeclass/Chain.cjs.map +1 -1
- package/_cjs/typeclass/Fail.cjs +0 -10
- package/_cjs/typeclass/Fail.cjs.map +1 -1
- package/_cjs/typeclass/Filterable.cjs +0 -36
- package/_cjs/typeclass/Filterable.cjs.map +1 -1
- package/_cjs/typeclass/Foldable.cjs +4 -34
- package/_cjs/typeclass/Foldable.cjs.map +1 -1
- package/_cjs/typeclass/FoldableWithIndex.cjs +4 -34
- package/_cjs/typeclass/FoldableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Functor.cjs +3 -18
- package/_cjs/typeclass/Functor.cjs.map +1 -1
- package/_cjs/typeclass/Guard/definition.cjs +3 -10
- package/_cjs/typeclass/Guard/definition.cjs.map +1 -1
- package/_cjs/typeclass/MonadExcept.cjs +2 -10
- package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
- package/_cjs/typeclass/Nil.cjs +0 -10
- package/_cjs/typeclass/Nil.cjs.map +1 -1
- package/_cjs/typeclass/Pointed.cjs +0 -11
- package/_cjs/typeclass/Pointed.cjs.map +1 -1
- package/_cjs/typeclass/Semialign.cjs +18 -46
- package/_cjs/typeclass/Semialign.cjs.map +1 -1
- package/_cjs/typeclass/Semimonoidal.cjs +0 -11
- package/_cjs/typeclass/Semimonoidal.cjs.map +1 -1
- package/_cjs/typeclass/Showable/show.cjs +12 -12
- package/_cjs/typeclass/Showable/show.cjs.map +1 -1
- package/_cjs/typeclass/Traversable.cjs +7 -26
- package/_cjs/typeclass/Traversable.cjs.map +1 -1
- package/_cjs/typeclass/TraversableWithIndex.cjs +3 -7
- package/_cjs/typeclass/TraversableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Witherable.cjs +3 -45
- package/_cjs/typeclass/Witherable.cjs.map +1 -1
- package/_cjs/typeclass/WitherableWithIndex.cjs +8 -44
- package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
- package/_mjs/collection/Iterable/api/traverseConc.mjs +16 -21
- package/_mjs/collection/Iterable/api/traverseConc.mjs.map +1 -1
- package/_mjs/collection/compat/Record/instances.mjs +62 -16
- package/_mjs/collection/compat/Record/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api.mjs +7 -11
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/definition.mjs +41 -42
- package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Dictionary/definition.mjs +2 -3
- package/_mjs/collection/immutable/Dictionary/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/api.mjs +18 -20
- package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/definition.mjs +15 -16
- package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +128 -147
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs +10 -11
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs +9 -8
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +18 -19
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs +0 -2
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +4 -3
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree/definition.mjs +13 -14
- package/_mjs/collection/immutable/RoseTree/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/api.mjs +8 -12
- package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/definition.mjs +11 -12
- package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -1
- package/_mjs/collection/weak/IterableWeakMap.mjs +51 -2
- package/_mjs/collection/weak/IterableWeakMap.mjs.map +1 -1
- package/_mjs/collection/weak/IterableWeakSet.mjs +59 -7
- package/_mjs/collection/weak/IterableWeakSet.mjs.map +1 -1
- package/_mjs/control/Eval/api.mjs +9 -4
- package/_mjs/control/Eval/api.mjs.map +1 -1
- package/_mjs/control/Eval/definition.mjs +0 -1
- package/_mjs/control/Eval/definition.mjs.map +1 -1
- package/_mjs/control/Eval/instance.mjs +1 -0
- package/_mjs/control/Eval/instance.mjs.map +1 -1
- package/_mjs/control/Z/api.mjs +16 -15
- package/_mjs/control/Z/api.mjs.map +1 -1
- package/_mjs/control/Z/definition.mjs +4 -5
- package/_mjs/control/Z/definition.mjs.map +1 -1
- package/_mjs/control/Z/instances.mjs +1 -0
- package/_mjs/control/Z/instances.mjs.map +1 -1
- package/_mjs/control/Z/runtime.mjs +14 -13
- package/_mjs/control/Z/runtime.mjs.map +1 -1
- package/_mjs/data/Const/definition.mjs +0 -3
- package/_mjs/data/Const/definition.mjs.map +1 -1
- package/_mjs/data/Const/instances.mjs +6 -5
- package/_mjs/data/Const/instances.mjs.map +1 -1
- package/_mjs/data/Datum/api.mjs +403 -0
- package/_mjs/data/Datum/api.mjs.map +1 -0
- package/_mjs/data/Datum/definition.mjs +112 -0
- package/_mjs/data/Datum/definition.mjs.map +1 -0
- package/_mjs/data/Datum/instances.mjs +52 -0
- package/_mjs/data/Datum/instances.mjs.map +1 -0
- package/_mjs/data/DatumEither/api.mjs +290 -0
- package/_mjs/data/DatumEither/api.mjs.map +1 -0
- package/_mjs/data/DatumEither/definition.mjs +2 -0
- package/_mjs/data/DatumEither/definition.mjs.map +1 -0
- package/_mjs/data/DecodeError/definition.mjs +3 -3
- package/_mjs/data/DecodeError/definition.mjs.map +1 -1
- package/_mjs/data/Decoder/definition.mjs +0 -2
- package/_mjs/data/Decoder/definition.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +16 -3
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/definition.mjs +0 -2
- package/_mjs/data/Either/definition.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +23 -22
- package/_mjs/data/Either/instances.mjs.map +1 -1
- package/_mjs/data/EitherT/api.mjs +73 -0
- package/_mjs/data/EitherT/api.mjs.map +1 -0
- package/_mjs/data/EitherT/definition.mjs +2 -0
- package/_mjs/data/EitherT/definition.mjs.map +1 -0
- package/_mjs/data/Environment/api.mjs +12 -13
- package/_mjs/data/Environment/api.mjs.map +1 -1
- package/_mjs/data/Environment/definition.mjs.map +1 -1
- package/_mjs/data/Identity/api.mjs +2 -1
- package/_mjs/data/Identity/api.mjs.map +1 -1
- package/_mjs/data/Identity/definition.mjs +2 -3
- package/_mjs/data/Identity/definition.mjs.map +1 -1
- package/_mjs/data/Identity/instances.mjs +1 -0
- package/_mjs/data/Identity/instances.mjs.map +1 -1
- package/_mjs/data/Intervals.mjs +257 -0
- package/_mjs/data/Intervals.mjs.map +1 -0
- package/_mjs/data/Maybe/api.mjs +2 -1
- package/_mjs/data/Maybe/api.mjs.map +1 -1
- package/_mjs/data/Maybe/definition.mjs +8 -10
- package/_mjs/data/Maybe/definition.mjs.map +1 -1
- package/_mjs/data/Maybe/instances.mjs +12 -11
- package/_mjs/data/Maybe/instances.mjs.map +1 -1
- package/_mjs/data/Newtype.mjs +3 -4
- package/_mjs/data/Newtype.mjs.map +1 -1
- package/_mjs/data/Struct/definition.mjs +2 -3
- package/_mjs/data/Struct/definition.mjs.map +1 -1
- package/_mjs/data/Zipped.mjs +37 -0
- package/_mjs/data/Zipped.mjs.map +1 -0
- package/_mjs/data/function/api.mjs +8 -0
- package/_mjs/data/function/api.mjs.map +1 -1
- package/_mjs/data/object/instances.mjs +7 -1
- package/_mjs/data/object/instances.mjs.map +1 -1
- package/_mjs/optics/Optional/definition.mjs +4 -5
- package/_mjs/optics/Optional/definition.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/compose.mjs +1 -1
- package/_mjs/optics/Traversal/api/compose.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/fromTraversable.mjs +1 -1
- package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
- package/_mjs/optics/Traversal/definition.mjs +3 -3
- package/_mjs/optics/Traversal/definition.mjs.map +1 -1
- package/_mjs/typeclass/Alt.mjs +0 -5
- package/_mjs/typeclass/Alt.mjs.map +1 -1
- package/_mjs/typeclass/ApplicativeExcept.mjs +7 -32
- package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -1
- package/_mjs/typeclass/Apply.mjs +35 -65
- package/_mjs/typeclass/Apply.mjs.map +1 -1
- package/_mjs/typeclass/Chain.mjs +4 -25
- package/_mjs/typeclass/Chain.mjs.map +1 -1
- package/_mjs/typeclass/Fail.mjs +1 -8
- package/_mjs/typeclass/Fail.mjs.map +1 -1
- package/_mjs/typeclass/Filterable.mjs +0 -28
- package/_mjs/typeclass/Filterable.mjs.map +1 -1
- package/_mjs/typeclass/Foldable.mjs +3 -30
- package/_mjs/typeclass/Foldable.mjs.map +1 -1
- package/_mjs/typeclass/FoldableWithIndex.mjs +3 -30
- package/_mjs/typeclass/FoldableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Functor.mjs +3 -16
- package/_mjs/typeclass/Functor.mjs.map +1 -1
- package/_mjs/typeclass/Guard/definition.mjs +0 -2
- package/_mjs/typeclass/Guard/definition.mjs.map +1 -1
- package/_mjs/typeclass/MonadExcept.mjs +2 -9
- package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
- package/_mjs/typeclass/Nil.mjs +1 -8
- package/_mjs/typeclass/Nil.mjs.map +1 -1
- package/_mjs/typeclass/Pointed.mjs +0 -9
- package/_mjs/typeclass/Pointed.mjs.map +1 -1
- package/_mjs/typeclass/Semialign.mjs +17 -45
- package/_mjs/typeclass/Semialign.mjs.map +1 -1
- package/_mjs/typeclass/Semimonoidal.mjs +0 -9
- package/_mjs/typeclass/Semimonoidal.mjs.map +1 -1
- package/_mjs/typeclass/Showable/show.mjs +12 -12
- package/_mjs/typeclass/Showable/show.mjs.map +1 -1
- package/_mjs/typeclass/Traversable.mjs +6 -25
- package/_mjs/typeclass/Traversable.mjs.map +1 -1
- package/_mjs/typeclass/TraversableWithIndex.mjs +2 -6
- package/_mjs/typeclass/TraversableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Witherable.mjs +3 -40
- package/_mjs/typeclass/Witherable.mjs.map +1 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs +6 -41
- package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -1
- package/_src/collection/Iterable/api/traverseConc.ts +24 -21
- package/_src/collection/compat/Record/instances.ts +44 -0
- package/_src/collection/immutable/Conc/api.ts +9 -11
- package/_src/collection/immutable/Conc/definition.ts +9 -5
- package/_src/collection/immutable/Dictionary/definition.ts +1 -1
- package/_src/collection/immutable/HashMap/api.ts +20 -17
- package/_src/collection/immutable/HashMap/definition.ts +10 -6
- package/_src/collection/immutable/ImmutableArray/api.ts +56 -113
- package/_src/collection/immutable/ImmutableArray/definition.ts +8 -5
- package/_src/collection/immutable/ImmutableArray/instances.ts +42 -42
- package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +13 -11
- package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +8 -3
- package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +24 -25
- package/_src/collection/immutable/RoseTree/definition.ts +7 -4
- package/_src/collection/immutable/Vector/api.ts +12 -16
- package/_src/collection/immutable/Vector/definition.ts +9 -9
- package/_src/collection/weak/IterableWeakMap.ts +50 -5
- package/_src/collection/weak/IterableWeakSet.ts +57 -9
- package/_src/control/Eval/api.ts +5 -2
- package/_src/control/Eval/definition.ts +7 -4
- package/_src/control/Eval/instance.ts +7 -7
- package/_src/control/Z/api.ts +16 -25
- package/_src/control/Z/definition.ts +32 -31
- package/_src/control/Z/instances.ts +3 -3
- package/_src/control/Z/runtime.ts +7 -7
- package/_src/data/Const/definition.ts +9 -17
- package/_src/data/Const/instances.ts +5 -5
- package/_src/data/Datum/api.ts +376 -0
- package/_src/data/Datum/definition.ts +102 -0
- package/_src/data/Datum/instances.ts +34 -0
- package/_src/data/DatumEither/api.ts +348 -0
- package/_src/data/DatumEither/definition.ts +20 -0
- package/_src/data/DecodeError/definition.ts +3 -3
- package/_src/data/Decoder/definition.ts +7 -4
- package/_src/data/Either/api.ts +12 -2
- package/_src/data/Either/definition.ts +9 -14
- package/_src/data/Either/instances.ts +6 -6
- package/_src/data/EitherT/api.ts +239 -0
- package/_src/data/EitherT/definition.ts +23 -0
- package/_src/data/Environment/api.ts +8 -6
- package/_src/data/Environment/definition.ts +2 -2
- package/_src/data/Identity/api.ts +2 -2
- package/_src/data/Identity/definition.ts +2 -2
- package/_src/data/Identity/instances.ts +7 -7
- package/_src/data/Intervals.ts +126 -0
- package/_src/data/Maybe/api.ts +2 -2
- package/_src/data/Maybe/definition.ts +7 -4
- package/_src/data/Maybe/instances.ts +10 -10
- package/_src/data/Newtype.ts +32 -11
- package/_src/data/Struct/definition.ts +1 -1
- package/_src/data/Tag/definition.ts +2 -2
- package/_src/data/Zipped.ts +52 -0
- package/_src/data/function/api.ts +8 -0
- package/_src/data/object/instances.ts +11 -1
- package/_src/optics/Optional/definition.ts +2 -2
- package/_src/optics/Traversal/api/compose.ts +1 -1
- package/_src/optics/Traversal/api/fromTraversable.ts +11 -11
- package/_src/optics/Traversal/definition.ts +13 -12
- package/_src/typeclass/Align.ts +1 -1
- package/_src/typeclass/Alt.ts +24 -54
- package/_src/typeclass/Alternative.ts +1 -1
- package/_src/typeclass/Applicative.ts +6 -1
- package/_src/typeclass/ApplicativeExcept.ts +55 -81
- package/_src/typeclass/Apply.ts +224 -253
- package/_src/typeclass/Chain.ts +71 -98
- package/_src/typeclass/Fail.ts +10 -28
- package/_src/typeclass/Filterable.ts +13 -67
- package/_src/typeclass/FilterableWithIndex.ts +13 -13
- package/_src/typeclass/Foldable.ts +16 -35
- package/_src/typeclass/FoldableWithIndex.ts +14 -37
- package/_src/typeclass/Functor.ts +11 -21
- package/_src/typeclass/FunctorWithIndex.ts +4 -4
- package/_src/typeclass/Guard/definition.ts +1 -3
- package/_src/typeclass/Monad.ts +1 -1
- package/_src/typeclass/MonadExcept.ts +11 -7
- package/_src/typeclass/Nil.ts +10 -27
- package/_src/typeclass/Pointed.ts +11 -30
- package/_src/typeclass/Semialign.ts +285 -253
- package/_src/typeclass/Semimonoidal.ts +23 -54
- package/_src/typeclass/Showable/show.ts +8 -10
- package/_src/typeclass/Traversable.ts +45 -63
- package/_src/typeclass/TraversableWithIndex.ts +37 -34
- package/_src/typeclass/Witherable.ts +28 -115
- package/_src/typeclass/WitherableWithIndex.ts +82 -115
- package/_src/types/extractions.ts +1 -1
- package/collection/Iterable/api/traverseConc.d.ts +4 -6
- package/collection/compat/Record/instances.d.ts +12 -0
- package/collection/immutable/Conc/api.d.ts +4 -6
- package/collection/immutable/Conc/definition.d.ts +9 -6
- package/collection/immutable/Dictionary/definition.d.ts +1 -1
- package/collection/immutable/HashMap/api.d.ts +13 -13
- package/collection/immutable/HashMap/definition.d.ts +10 -7
- package/collection/immutable/ImmutableArray/api.d.ts +16 -18
- package/collection/immutable/ImmutableArray/definition.d.ts +8 -6
- package/collection/immutable/ImmutableArray/instances.d.ts +17 -17
- package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +6 -5
- package/collection/immutable/ImmutableNonEmptyArray/definition.d.ts +7 -3
- package/collection/immutable/ImmutableNonEmptyArray/instances.d.ts +10 -10
- package/collection/immutable/RoseTree/definition.d.ts +7 -5
- package/collection/immutable/Vector/api.d.ts +4 -4
- package/collection/immutable/Vector/definition.d.ts +8 -9
- package/collection/weak/IterableWeakMap.d.ts +9 -3
- package/collection/weak/IterableWeakSet.d.ts +10 -4
- package/control/Eval/api.d.ts +6 -1
- package/control/Eval/definition.d.ts +6 -4
- package/control/Eval/instance.d.ts +3 -3
- package/control/Z/api.d.ts +8 -6
- package/control/Z/definition.d.ts +38 -32
- package/control/Z/instances.d.ts +2 -2
- package/control/Z/runtime.d.ts +5 -4
- package/data/Const/definition.d.ts +8 -16
- package/data/Const/instances.d.ts +4 -3
- package/data/Datum/api.d.ts +188 -0
- package/data/Datum/definition.d.ts +75 -0
- package/data/Datum/instances.d.ts +32 -0
- package/data/DatumEither/api.d.ts +169 -0
- package/data/DatumEither/definition.d.ts +21 -0
- package/data/Decoder/definition.d.ts +6 -4
- package/data/Either/api.d.ts +10 -0
- package/data/Either/definition.d.ts +8 -14
- package/data/Either/instances.d.ts +4 -3
- package/data/EitherT/api.d.ts +60 -0
- package/data/EitherT/definition.d.ts +12 -0
- package/data/Environment/api.d.ts +7 -5
- package/data/Environment/definition.d.ts +3 -3
- package/data/Identity/api.d.ts +2 -1
- package/data/Identity/definition.d.ts +2 -2
- package/data/Identity/instances.d.ts +3 -3
- package/data/Intervals.d.ts +53 -0
- package/data/Maybe/api.d.ts +2 -1
- package/data/Maybe/definition.d.ts +7 -4
- package/data/Maybe/instances.d.ts +6 -6
- package/data/Newtype.d.ts +9 -8
- package/data/Struct/definition.d.ts +1 -1
- package/data/Tag/definition.d.ts +2 -2
- package/data/Zipped.d.ts +24 -0
- package/data/function/api.d.ts +6 -0
- package/data/object/instances.d.ts +6 -1
- package/optics/Traversal/api/fromTraversable.d.ts +1 -1
- package/optics/Traversal/definition.d.ts +2 -4
- package/package.json +2 -2
- package/typeclass/Align.d.ts +1 -1
- package/typeclass/Alt.d.ts +2 -4
- package/typeclass/Alternative.d.ts +1 -1
- package/typeclass/Applicative.d.ts +2 -1
- package/typeclass/ApplicativeExcept.d.ts +5 -13
- package/typeclass/Apply.d.ts +20 -32
- package/typeclass/Chain.d.ts +5 -13
- package/typeclass/Fail.d.ts +2 -7
- package/typeclass/Filterable.d.ts +7 -31
- package/typeclass/FilterableWithIndex.d.ts +7 -7
- package/typeclass/Foldable.d.ts +6 -19
- package/typeclass/FoldableWithIndex.d.ts +6 -19
- package/typeclass/Functor.d.ts +4 -11
- package/typeclass/FunctorWithIndex.d.ts +2 -2
- package/typeclass/Guard/definition.d.ts +1 -4
- package/typeclass/Monad.d.ts +1 -1
- package/typeclass/MonadExcept.d.ts +3 -4
- package/typeclass/Nil.d.ts +2 -7
- package/typeclass/Pointed.d.ts +2 -7
- package/typeclass/Semialign.d.ts +26 -32
- package/typeclass/Semimonoidal.d.ts +3 -8
- package/typeclass/Traversable.d.ts +21 -12
- package/typeclass/TraversableWithIndex.d.ts +19 -6
- package/typeclass/Witherable.d.ts +5 -19
- package/typeclass/WitherableWithIndex.d.ts +33 -19
- package/types/extractions.d.ts +1 -1
|
@@ -4,43 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Traversable = void 0;
|
|
7
|
+
exports.mkTraverse_ = mkTraverse_;
|
|
7
8
|
exports.sequence = sequence;
|
|
8
|
-
exports.traverse = void 0;
|
|
9
9
|
|
|
10
10
|
var _function = /*#__PURE__*/require("@fncts/base/data/function");
|
|
11
11
|
|
|
12
|
-
const traverse = traverse_1;
|
|
13
|
-
exports.traverse = traverse;
|
|
14
12
|
const Traversable = {};
|
|
15
|
-
/**
|
|
16
|
-
* @tsplus fluent fncts.Kind traverse
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
13
|
exports.Traversable = Traversable;
|
|
20
14
|
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
F,
|
|
24
|
-
/** @tsplus auto */
|
|
25
|
-
G) {
|
|
26
|
-
return F.traverse(ta, f, G);
|
|
15
|
+
function mkTraverse_() {
|
|
16
|
+
return i => i();
|
|
27
17
|
}
|
|
28
18
|
/**
|
|
29
|
-
* @tsplus
|
|
19
|
+
* @tsplus static fncts.TraversableOps sequence
|
|
30
20
|
*/
|
|
31
21
|
|
|
32
22
|
|
|
33
|
-
function sequence(
|
|
34
|
-
|
|
35
|
-
F
|
|
36
|
-
/** @tsplus auto */
|
|
37
|
-
G) {
|
|
38
|
-
const G_1 =
|
|
39
|
-
/** @tsplus auto */
|
|
40
|
-
G;
|
|
41
|
-
const F_1 =
|
|
42
|
-
/** @tsplus auto */
|
|
43
|
-
F;
|
|
44
|
-
return traverse_1(ta, _function.identity, F_1, G_1);
|
|
23
|
+
function sequence(F) {
|
|
24
|
+
// @ts-expect-error
|
|
25
|
+
return ta => G => F.traverse(ta)(G)(_function.identity);
|
|
45
26
|
}
|
|
46
27
|
//# sourceMappingURL=Traversable.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Traversable.cjs","mappings":";;;;;;;;;AAIA;;
|
|
1
|
+
{"version":3,"file":"Traversable.cjs","mappings":";;;;;;;;;AAIA;;AAoBO,MAAMA,WAAW,GAAmB,EAApC;;;AAwBD,SAAUC,WAAV,GAAqB;EACzB,OAAQC,CAAD,IAAYA,CAAC,EAApB;AACD;AAED;;;;;AAGM,SAAUC,QAAV,CACJC,CADI,EACiB;EAUrB;EACA,OAAQC,EAAD,IAASC,CAAD,IAAOF,CAAC,CAACG,QAAF,CAAWF,EAAX,EAAeC,CAAf,EAAkBE,kBAAlB,CAAtB;AACD","names":["Traversable","mkTraverse_","i","sequence","F","ta","G","traverse","identity"],"sourceRoot":"","sources":["../../_src/typeclass/Traversable.ts"],"sourcesContent":[null]}
|
|
@@ -4,15 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TraversableWithIndex = void 0;
|
|
7
|
-
exports.
|
|
7
|
+
exports.mkTraverseWithIndex_ = mkTraverseWithIndex_;
|
|
8
8
|
const TraversableWithIndex = {};
|
|
9
9
|
exports.TraversableWithIndex = TraversableWithIndex;
|
|
10
10
|
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
F,
|
|
14
|
-
/** @tsplus auto */
|
|
15
|
-
G) {
|
|
16
|
-
return F.traverseWithIndex(ta, f, G);
|
|
11
|
+
function mkTraverseWithIndex_() {
|
|
12
|
+
return i => i();
|
|
17
13
|
}
|
|
18
14
|
//# sourceMappingURL=TraversableWithIndex.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TraversableWithIndex.cjs","mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"TraversableWithIndex.cjs","mappings":";;;;;;;AA0BO,MAAMA,oBAAoB,GAA4B,EAAtD;;;AA0BD,SAAUC,oBAAV,GAA8B;EAClC,OAAQC,CAAD,IAAYA,CAAC,EAApB;AACD","names":["TraversableWithIndex","mkTraverseWithIndex_","i"],"sourceRoot":"","sources":["../../_src/typeclass/TraversableWithIndex.ts"],"sourcesContent":[null]}
|
|
@@ -5,63 +5,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Witherable = void 0;
|
|
7
7
|
exports.filterA = filterA;
|
|
8
|
-
exports.wilt = wilt;
|
|
9
|
-
exports.wither = void 0;
|
|
10
8
|
|
|
11
9
|
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
|
|
12
10
|
|
|
13
|
-
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/typeclass/Functor"));
|
|
14
|
-
|
|
15
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
12
|
|
|
17
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
14
|
|
|
19
|
-
const wither = wither_1;
|
|
20
|
-
exports.wither = wither;
|
|
21
15
|
const Witherable = {};
|
|
22
16
|
/**
|
|
23
|
-
* @tsplus
|
|
17
|
+
* @tsplus static fncts.WitherableOps filterA
|
|
24
18
|
*/
|
|
25
19
|
|
|
26
20
|
exports.Witherable = Witherable;
|
|
27
21
|
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
F,
|
|
31
|
-
/** @tsplus auto */
|
|
32
|
-
G) {
|
|
33
|
-
const G_1 =
|
|
34
|
-
/** @tsplus auto */
|
|
35
|
-
G;
|
|
36
|
-
return F.wither(wa, f, G_1);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function wilt(wa, f,
|
|
40
|
-
/** @tsplus auto */
|
|
41
|
-
F,
|
|
42
|
-
/** @tsplus auto */
|
|
43
|
-
G) {
|
|
44
|
-
const G_2 =
|
|
45
|
-
/** @tsplus auto */
|
|
46
|
-
G;
|
|
47
|
-
return F.wilt(wa, f, G_2);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* @tsplus fluent fncts.Kind filterA
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
function filterA(fa, p,
|
|
55
|
-
/** @tsplus auto */
|
|
56
|
-
F,
|
|
57
|
-
/** @tsplus auto */
|
|
58
|
-
G) {
|
|
59
|
-
const G_3 =
|
|
60
|
-
/** @tsplus auto */
|
|
61
|
-
G;
|
|
62
|
-
const F_1 =
|
|
63
|
-
/** @tsplus auto */
|
|
64
|
-
F;
|
|
65
|
-
return wither_1(fa, a => tsplus_module_2.map(p(a), bb => bb ? tsplus_module_1.just(a) : tsplus_module_1.nothing(), G), F_1, G_3);
|
|
22
|
+
function filterA(F) {
|
|
23
|
+
return fa => G => p => F.wither(fa)(G)(a => G.map(p(a), bb => bb ? tsplus_module_1.just(a) : tsplus_module_1.nothing()));
|
|
66
24
|
}
|
|
67
25
|
//# sourceMappingURL=Witherable.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witherable.cjs","mappings":"
|
|
1
|
+
{"version":3,"file":"Witherable.cjs","mappings":";;;;;;;;;;;;;;AAyCO,MAAMA,UAAU,GAAkB,EAAlC;AAEP;;;;;;AAGM,SAAUC,OAAV,CACJC,CADI,EACgB;EAQpB,OAAQC,EAAD,IAASC,CAAD,IAAQC,CAAD,IAAOH,CAAC,CAACI,MAAF,CAASH,EAAT,EAAaC,CAAb,EAAiBG,CAAD,IAAOH,CAAC,CAACI,GAAF,CAAMH,CAAC,CAACE,CAAD,CAAP,EAAaE,EAAD,IAASA,EAAE,GAAGC,qBAAKH,CAAL,CAAH,GAAaG,yBAApC,CAAvB,CAA7B;AACD","names":["Witherable","filterA","F","fa","G","p","wither","a","map","bb","tsplus_module_1"],"sourceRoot":"","sources":["../../_src/typeclass/Witherable.ts"],"sourcesContent":[null]}
|
|
@@ -5,63 +5,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.WitherableWithIndex = void 0;
|
|
7
7
|
exports.filterWithIndexA = filterWithIndexA;
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
8
|
+
exports.makeWiltWithIndex = makeWiltWithIndex;
|
|
9
|
+
exports.makeWitherWithIndex = makeWitherWithIndex;
|
|
10
10
|
|
|
11
11
|
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
|
|
12
12
|
|
|
13
|
-
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/typeclass/Functor"));
|
|
14
|
-
|
|
15
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
14
|
|
|
17
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
16
|
|
|
19
|
-
const witherWithIndex = witherWithIndex_1;
|
|
20
|
-
exports.witherWithIndex = witherWithIndex;
|
|
21
17
|
const WitherableWithIndex = {};
|
|
22
|
-
/**
|
|
23
|
-
* @tsplus fluent fncts.Kind witherWithIndex
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
18
|
exports.WitherableWithIndex = WitherableWithIndex;
|
|
27
19
|
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
F,
|
|
31
|
-
/** @tsplus auto */
|
|
32
|
-
G) {
|
|
33
|
-
const G_1 =
|
|
34
|
-
/** @tsplus auto */
|
|
35
|
-
G;
|
|
36
|
-
return F.witherWithIndex(wa, f, G_1);
|
|
20
|
+
function makeWitherWithIndex() {
|
|
21
|
+
return i => i();
|
|
37
22
|
}
|
|
38
|
-
/**
|
|
39
|
-
* @tsplus fluent fncts.Kind wiltWithIndex
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
23
|
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
F,
|
|
46
|
-
/** @tsplus auto */
|
|
47
|
-
G) {
|
|
48
|
-
const G_2 =
|
|
49
|
-
/** @tsplus auto */
|
|
50
|
-
G;
|
|
51
|
-
return F.wiltWithIndex(wa, f, G_2);
|
|
24
|
+
function makeWiltWithIndex() {
|
|
25
|
+
return i => i();
|
|
52
26
|
}
|
|
53
27
|
|
|
54
|
-
function filterWithIndexA(
|
|
55
|
-
|
|
56
|
-
F,
|
|
57
|
-
/** @tsplus auto */
|
|
58
|
-
G) {
|
|
59
|
-
const G_3 =
|
|
60
|
-
/** @tsplus auto */
|
|
61
|
-
G;
|
|
62
|
-
const F_1 =
|
|
63
|
-
/** @tsplus auto */
|
|
64
|
-
F;
|
|
65
|
-
return witherWithIndex_1(fa, (i, a) => tsplus_module_2.map(p(i, a), bb => bb ? tsplus_module_1.just(a) : tsplus_module_1.nothing(), G), F_1, G_3);
|
|
28
|
+
function filterWithIndexA(F) {
|
|
29
|
+
return fa => G => p => F.witherWithIndex(fa)(G)((i, a) => G.map(p(i, a), bb => bb ? tsplus_module_1.just(a) : tsplus_module_1.nothing()));
|
|
66
30
|
}
|
|
67
31
|
//# sourceMappingURL=WitherableWithIndex.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WitherableWithIndex.cjs","mappings":"
|
|
1
|
+
{"version":3,"file":"WitherableWithIndex.cjs","mappings":";;;;;;;;;;;;;;;;AA6CO,MAAMA,mBAAmB,GAA2B,EAApD;;;AA0BD,SAAUC,mBAAV,GAA6B;EACjC,OAAQC,CAAD,IAAYA,CAAC,EAApB;AACD;;AA8BK,SAAUC,iBAAV,GAA2B;EAC/B,OAAQD,CAAD,IAAYA,CAAC,EAApB;AACD;;AAEK,SAAUE,gBAAV,CACJC,CADI,EACyB;EAQ7B,OAAQC,EAAD,IAASC,CAAD,IAAQC,CAAD,IAAOH,CAAC,CAACI,eAAF,CAAkBH,EAAlB,EAAsBC,CAAtB,EAAyB,CAACL,CAAD,EAAIQ,CAAJ,KAAUH,CAAC,CAACI,GAAF,CAAMH,CAAC,CAACN,CAAD,EAAIQ,CAAJ,CAAP,EAAgBE,EAAD,IAASA,EAAE,GAAGC,qBAAKH,CAAL,CAAH,GAAaG,yBAAvC,CAAnC,CAA7B;AACD","names":["WitherableWithIndex","makeWitherWithIndex","i","makeWiltWithIndex","filterWithIndexA","F","fa","G","p","witherWithIndex","a","map","bb","tsplus_module_1"],"sourceRoot":"","sources":["../../_src/typeclass/WitherableWithIndex.ts"],"sourcesContent":[null]}
|
|
@@ -2,35 +2,30 @@ import * as tsplus_module_1 from "@fncts/base/collection/immutable/Conc/api/empt
|
|
|
2
2
|
import * as tsplus_module_2 from "@fncts/base/collection/immutable/Conc/api";
|
|
3
3
|
export const traverseToConcWithIndex_ = traverseToConcWithIndex_1;
|
|
4
4
|
/**
|
|
5
|
-
* @tsplus
|
|
5
|
+
* @tsplus getter fncts.Iterable traverseToConcWithIndex
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
function traverseToConcWithIndex_1(ta
|
|
9
|
-
|
|
10
|
-
G)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
let i = 0;
|
|
8
|
+
function traverseToConcWithIndex_1(ta) {
|
|
9
|
+
return G => f => {
|
|
10
|
+
let output = G.pure(tsplus_module_1.empty());
|
|
11
|
+
const iterator = ta[Symbol.iterator]();
|
|
12
|
+
let result;
|
|
13
|
+
let i = 0;
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
while (!(result = iterator.next()).done) {
|
|
16
|
+
output = G.zipWith(output, f(i, result.value), (bs, b) => tsplus_module_2.append_(bs, b));
|
|
17
|
+
i++;
|
|
18
|
+
}
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
return output;
|
|
21
|
+
};
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* @tsplus
|
|
24
|
+
* @tsplus getter fncts.Iterable traverseToConc
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
export function traverseToConc_(ta
|
|
29
|
-
|
|
30
|
-
G) {
|
|
31
|
-
const G_1 =
|
|
32
|
-
/** @tsplus auto */
|
|
33
|
-
G;
|
|
34
|
-
return traverseToConcWithIndex_1(ta, (_, a) => f(a), G_1);
|
|
28
|
+
export function traverseToConc_(ta) {
|
|
29
|
+
return G => f => traverseToConcWithIndex_1(ta)(G)((_, a) => f(a));
|
|
35
30
|
}
|
|
36
31
|
//# sourceMappingURL=traverseConc.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverseConc.mjs","mappings":";;aAKgBA,wBAAwB;AAHxC;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"traverseConc.mjs","mappings":";;aAKgBA,wBAAwB;AAHxC;;;;AAGA,mCAA4CC,EAA5C,EAA2D;EACzD,OAAsCC,CAA/B,IAEHC,CADF,IAEsD;IACpD,IAAIC,MAAM,GAAOF,CAAC,CAACG,IAAF,CAAwCC,uBAAxC,CAAjB;IACA,MAAMC,QAAQ,GAAGN,EAAE,CAACO,MAAM,CAACD,QAAR,CAAF,EAAjB;IACA,IAAIE,MAAJ;IACA,IAAIC,CAAC,GAAY,CAAjB;;IACA,OAAO,CAAC,CAACD,MAAM,GAAGF,QAAQ,CAACI,IAAT,EAAV,EAA2BC,IAAnC,EAAyC;MACvCR,MAAM,GAAGF,CAAC,CAACW,OAAF,CAAUT,MAAV,EAAkBD,CAAC,CAACO,CAAD,EAAID,MAAM,CAACK,KAAX,CAAnB,EAAsC,CAACC,EAAD,EAAKC,CAAL,KAAWC,4BAAUD,CAAV,CAAjD,CAAT;MACAN,CAAC;IACF;;IAED,OAAON,MAAP;EACD,CAdH;AAeD;AAED;;;;;AAGA,OAAM,SAAUc,eAAV,CACJjB,EADI,EACW;EAMf,OAAQC,CAAD,IAAQC,CAAD,IAAOgB,8BAA2BjB,CAA3B,EAA8B,CAACkB,CAAD,EAAIC,CAAJ,KAAUlB,CAAC,CAACkB,CAAD,CAAzC,CAArB;AACD","names":["traverseToConcWithIndex_","ta","G","f","output","pure","tsplus_module_1","iterator","Symbol","result","i","next","done","zipWith","value","bs","b","tsplus_module_2","traverseToConc_","traverseToConcWithIndex_1","_","a"],"sourceRoot":"","sources":["../../../../_src/collection/Iterable/api/traverseConc.ts"],"sourcesContent":[null]}
|
|
@@ -1,20 +1,66 @@
|
|
|
1
|
-
import * as tsplus_module_1 from "@fncts/base/
|
|
2
|
-
import * as tsplus_module_2 from "@fncts/base/data/
|
|
3
|
-
import * as tsplus_module_3 from "@fncts/base/data/
|
|
4
|
-
import * as tsplus_module_4 from "@fncts/base/data/
|
|
5
|
-
import * as tsplus_module_5 from "@fncts/base/
|
|
6
|
-
import * as tsplus_module_6 from "@fncts/base/
|
|
7
|
-
import * as tsplus_module_7 from "@fncts/base/data/
|
|
1
|
+
import * as tsplus_module_1 from "@fncts/base/typeclass/Guard/definition";
|
|
2
|
+
import * as tsplus_module_2 from "@fncts/base/data/Decoder/api";
|
|
3
|
+
import * as tsplus_module_3 from "@fncts/base/data/These/api";
|
|
4
|
+
import * as tsplus_module_4 from "@fncts/base/data/Maybe/definition";
|
|
5
|
+
import * as tsplus_module_5 from "@fncts/base/data/These/destructors";
|
|
6
|
+
import * as tsplus_module_6 from "@fncts/base/collection/immutable/Vector/api";
|
|
7
|
+
import * as tsplus_module_7 from "@fncts/base/data/These/constructors";
|
|
8
|
+
import * as tsplus_module_8 from "@fncts/base/data/Decoder/definition";
|
|
8
9
|
import { CompoundError, MissingKeyError, OptionalKeyError, RequiredKeyError } from "@fncts/base/data/DecodeError";
|
|
10
|
+
/**
|
|
11
|
+
* @tsplus derive fncts.Guard<_> 15
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export function deriveDictionaryGuard(...[value]) {
|
|
15
|
+
const value_1 = value;
|
|
16
|
+
return tsplus_module_1.makeGuard(u => {
|
|
17
|
+
if (!value_1.is(u)) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
for (const k of Object.keys(u)) {
|
|
22
|
+
if (!value.is(u[k])) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return true;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @tsplus derive fncts.Guard<_> 15
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
export function deriveGuard(...[key, value, requiredKeys]) {
|
|
35
|
+
const key_1 = key;
|
|
36
|
+
const requiredKeysSet = new Set(Object.keys(requiredKeys));
|
|
37
|
+
return tsplus_module_1.makeGuard(record => {
|
|
38
|
+
const missing = new Set(requiredKeysSet);
|
|
39
|
+
|
|
40
|
+
if (!key_1.is(record)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
for (const k of Object.keys(record)) {
|
|
45
|
+
if (requiredKeysSet.has(k) && !value.is(record[k])) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
missing.delete(k);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return missing.size === 0;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
9
55
|
/**
|
|
10
56
|
* @tsplus derive fncts.Decoder<_> 15
|
|
11
57
|
*/
|
|
12
58
|
|
|
13
59
|
export function deriveDecoder(...[keyGuard, valueDecoder, requiredKeysRecord]) {
|
|
14
|
-
return
|
|
15
|
-
const recordResult =
|
|
60
|
+
return tsplus_module_8.makeDecoder(u => {
|
|
61
|
+
const recordResult = tsplus_module_2.string.decode(u);
|
|
16
62
|
|
|
17
|
-
if (
|
|
63
|
+
if (tsplus_module_3.isLeft(recordResult)) {
|
|
18
64
|
return recordResult;
|
|
19
65
|
}
|
|
20
66
|
|
|
@@ -27,14 +73,14 @@ export function deriveDecoder(...[keyGuard, valueDecoder, requiredKeysRecord]) {
|
|
|
27
73
|
for (const k in asRecord) {
|
|
28
74
|
if (keyGuard.is(k)) {
|
|
29
75
|
const valueResult = valueDecoder.decode(asRecord[k]);
|
|
30
|
-
|
|
76
|
+
tsplus_module_5.match2(valueResult, e => {
|
|
31
77
|
errored = true;
|
|
32
78
|
errors.push(new (k in requiredKeysRecord ? RequiredKeyError : OptionalKeyError)(k, e));
|
|
33
79
|
}, (warning, a) => {
|
|
34
80
|
missing.delete(k);
|
|
35
81
|
res[k] = a;
|
|
36
82
|
|
|
37
|
-
if (
|
|
83
|
+
if (tsplus_module_4.isJust(warning)) {
|
|
38
84
|
errors.push(new (k in requiredKeysRecord ? RequiredKeyError : OptionalKeyError)(k, warning.value));
|
|
39
85
|
}
|
|
40
86
|
});
|
|
@@ -42,18 +88,18 @@ export function deriveDecoder(...[keyGuard, valueDecoder, requiredKeysRecord]) {
|
|
|
42
88
|
}
|
|
43
89
|
|
|
44
90
|
if (errored) {
|
|
45
|
-
return
|
|
91
|
+
return tsplus_module_7.left(new CompoundError("record", tsplus_module_6.from(errors)));
|
|
46
92
|
}
|
|
47
93
|
|
|
48
94
|
if (errors.length > 0) {
|
|
49
|
-
return
|
|
95
|
+
return tsplus_module_7.both(new CompoundError("record", tsplus_module_6.from(errors)), res);
|
|
50
96
|
}
|
|
51
97
|
|
|
52
98
|
if (missing.size > 0) {
|
|
53
|
-
return
|
|
99
|
+
return tsplus_module_7.left(new CompoundError("record", tsplus_module_6.map_(tsplus_module_6.from(missing), k => new MissingKeyError(k))));
|
|
54
100
|
}
|
|
55
101
|
|
|
56
|
-
return
|
|
102
|
+
return tsplus_module_7.right(res);
|
|
57
103
|
}, `Record<string, ${valueDecoder.label}>`);
|
|
58
104
|
}
|
|
59
105
|
//# sourceMappingURL=instances.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instances.mjs","mappings":"
|
|
1
|
+
{"version":3,"file":"instances.mjs","mappings":"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","names":["CompoundError","MissingKeyError","OptionalKeyError","RequiredKeyError","deriveDictionaryGuard","value","tsplus_module_1","u","value_1","is","k","Object","keys","deriveGuard","key","requiredKeys","requiredKeysSet","Set","record","missing","key_1","has","delete","size","deriveDecoder","keyGuard","valueDecoder","requiredKeysRecord","tsplus_module_8","recordResult","tsplus_module_2","decode","tsplus_module_3","asRecord","right","errors","errored","res","valueResult","tsplus_module_5","e","push","warning","a","tsplus_module_4","tsplus_module_7","tsplus_module_6","length","label"],"sourceRoot":"","sources":["../../../../_src/collection/compat/Record/instances.ts"],"sourcesContent":[null]}
|
|
@@ -7,7 +7,7 @@ import * as tsplus_module_6 from "@fncts/base/data/Maybe/constructors";
|
|
|
7
7
|
import * as tsplus_module_7 from "@fncts/base/internal/Stack";
|
|
8
8
|
import * as tsplus_module_8 from "@fncts/base/data/Either/destructors";
|
|
9
9
|
import * as tsplus_module_9 from "@fncts/base/collection/Iterable/constructors";
|
|
10
|
-
import * as tsplus_module_10 from "@fncts/base/typeclass/
|
|
10
|
+
import * as tsplus_module_10 from "@fncts/base/typeclass/TraversableWithIndex";
|
|
11
11
|
import * as tsplus_module_11 from "@fncts/base/data/function/api";
|
|
12
12
|
import * as tsplus_module_12 from "@fncts/base/data/exceptions";
|
|
13
13
|
export const alignWith_ = alignWith_1;
|
|
@@ -35,7 +35,6 @@ export const partitionMapWithIndex_ = partitionMapWithIndex_1;
|
|
|
35
35
|
export const partitionWithIndex_ = partitionWithIndex_1;
|
|
36
36
|
export const splitAt_ = splitAt_1;
|
|
37
37
|
export const take_ = take_1;
|
|
38
|
-
export const traverseWithIndex = traverseWithIndex_1;
|
|
39
38
|
export const unsafeGet_ = unsafeGet_1;
|
|
40
39
|
export const unsafeHead = unsafeHead_1;
|
|
41
40
|
export const unsafeTail = unsafeTail_1;
|
|
@@ -44,6 +43,7 @@ export const zipWith_ = zipWith_1;
|
|
|
44
43
|
export const zipWithIndexOffset_ = zipWithIndexOffset_1;
|
|
45
44
|
import { _Empty, BUFFER_SIZE, Chunk, concrete, Singleton, Slice } from "@fncts/base/collection/immutable/Conc/definition";
|
|
46
45
|
import { identity, tuple } from "@fncts/base/data/function";
|
|
46
|
+
import * as P from "@fncts/base/typeclass";
|
|
47
47
|
/**
|
|
48
48
|
* @tsplus fluent fncts.Conc align
|
|
49
49
|
*/
|
|
@@ -1180,24 +1180,20 @@ export function takeWhile_(self, p) {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
/**
|
|
1183
|
-
* @tsplus
|
|
1183
|
+
* @tsplus getter fncts.Conc traverse
|
|
1184
1184
|
*/
|
|
1185
1185
|
|
|
1186
|
-
export const traverse =
|
|
1186
|
+
export const traverse = self => G => f => traverseWithIndex_1(self)(G)((_, a) => f(a));
|
|
1187
1187
|
/**
|
|
1188
|
-
* @tsplus
|
|
1188
|
+
* @tsplus getter fncts.Conc traverseWithIndex
|
|
1189
1189
|
*/
|
|
1190
1190
|
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
G) {
|
|
1194
|
-
return foldLeftWithIndex_1(self, G.pure(tsplus_module_2.empty()), (i, fbs, a) => tsplus_module_10.zipWith(fbs, f(i, a), (bs, b) => append_1(bs, b), G));
|
|
1195
|
-
}
|
|
1191
|
+
const traverseWithIndex_1 = /*#__PURE__*/tsplus_module_10.mkTraverseWithIndex_()(() => self => G => f => foldLeftWithIndex_1(self, G.pure(tsplus_module_2.empty()), (i, fbs, a) => G.zipWith(fbs, f(i, a), (bs, b) => append_1(bs, b))));
|
|
1192
|
+
export const traverseWithIndex = traverseWithIndex_1;
|
|
1196
1193
|
/**
|
|
1197
1194
|
* @tsplus getter fncts.Conc toBuffer
|
|
1198
1195
|
*/
|
|
1199
1196
|
|
|
1200
|
-
|
|
1201
1197
|
export function toBuffer(self) {
|
|
1202
1198
|
void 0;
|
|
1203
1199
|
return self.arrayLike();
|