@fncts/base 0.0.3 → 0.0.6
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 +21 -15
- package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -1
- package/_cjs/collection/Iterable/api.cjs +23 -37
- package/_cjs/collection/Iterable/api.cjs.map +1 -1
- package/_cjs/collection/compat/Array/api.cjs +1 -1
- package/_cjs/collection/compat/Array/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/api.cjs +41 -53
- package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/definition.cjs +49 -39
- package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Dictionary/definition.cjs +4 -2
- package/_cjs/collection/immutable/Dictionary/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/api.cjs +35 -108
- package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/definition.cjs +19 -15
- package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet/api.cjs +10 -10
- package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs +22 -0
- package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs +20 -0
- package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs +20 -0
- package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs +33 -0
- package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +252 -409
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs +12 -10
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs +153 -157
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray.cjs +52 -0
- package/_cjs/collection/immutable/ImmutableArray.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +125 -184
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs +2 -4
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs +25 -2
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs +5 -3
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +45 -81
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/List/api.cjs +4 -7
- package/_cjs/collection/immutable/List/api.cjs.map +1 -1
- package/_cjs/collection/immutable/RoseTree/api.cjs +484 -0
- package/_cjs/collection/immutable/RoseTree/api.cjs.map +1 -0
- package/_cjs/collection/immutable/RoseTree/definition.cjs +58 -0
- package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/RoseTree.cjs +32 -0
- package/_cjs/collection/immutable/RoseTree.cjs.map +1 -0
- package/_cjs/collection/immutable/SortedMap/api.cjs +65 -65
- package/_cjs/collection/immutable/SortedMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/api.cjs +70 -15
- package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/definition.cjs +13 -11
- package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
- package/_cjs/collection/mutable/HashMap.cjs +5 -5
- package/_cjs/collection/mutable/HashMap.cjs.map +1 -1
- package/_cjs/collection/mutable/HashSet.cjs +4 -4
- package/_cjs/collection/mutable/HashSet.cjs.map +1 -1
- package/_cjs/control/Eval/api.cjs +6 -0
- package/_cjs/control/Eval/api.cjs.map +1 -1
- package/_cjs/control/Eval/definition.cjs +7 -0
- package/_cjs/control/Eval/definition.cjs.map +1 -1
- package/_cjs/control/Eval/instance.cjs +14 -25
- package/_cjs/control/Eval/instance.cjs.map +1 -1
- package/_cjs/control/Z/definition.cjs +9 -3
- package/_cjs/control/Z/definition.cjs.map +1 -1
- package/_cjs/control/Z/instances.cjs +6 -13
- package/_cjs/control/Z/instances.cjs.map +1 -1
- package/_cjs/data/Branded/definition.cjs +29 -0
- package/_cjs/data/Branded/definition.cjs.map +1 -0
- package/_cjs/data/Branded/derivations.cjs +58 -0
- package/_cjs/data/Branded/derivations.cjs.map +1 -0
- package/_cjs/data/Branded.cjs +32 -0
- package/_cjs/data/Branded.cjs.map +1 -0
- package/_cjs/data/CaseClass.cjs +4 -2
- package/_cjs/data/CaseClass.cjs.map +1 -1
- package/_cjs/data/Cause/api/fold.cjs +2 -0
- package/_cjs/data/Cause/api/fold.cjs.map +1 -1
- package/_cjs/data/Cause/api.cjs +23 -0
- package/_cjs/data/Cause/api.cjs.map +1 -1
- package/_cjs/data/Const/api.cjs +3 -7
- package/_cjs/data/Const/api.cjs.map +1 -1
- package/_cjs/data/Const/definition.cjs +19 -1
- package/_cjs/data/Const/definition.cjs.map +1 -1
- package/_cjs/data/Const/instances.cjs +9 -20
- package/_cjs/data/Const/instances.cjs.map +1 -1
- package/_cjs/data/DecodeError/definition.cjs +308 -0
- package/_cjs/data/DecodeError/definition.cjs.map +1 -0
- package/_cjs/data/DecodeError.cjs +19 -0
- package/_cjs/data/DecodeError.cjs.map +1 -0
- package/_cjs/data/Decoder/api.cjs +217 -0
- package/_cjs/data/Decoder/api.cjs.map +1 -0
- package/_cjs/data/Decoder/definition.cjs +41 -0
- package/_cjs/data/Decoder/definition.cjs.map +1 -0
- package/_cjs/data/Decoder.cjs +32 -0
- package/_cjs/data/Decoder.cjs.map +1 -0
- package/_cjs/data/Duration/api.cjs +22 -9
- package/_cjs/data/Duration/api.cjs.map +1 -1
- package/_cjs/data/Either/api/alignWith.cjs +2 -0
- package/_cjs/data/Either/api/alignWith.cjs.map +1 -1
- package/_cjs/data/Either/api.cjs +105 -42
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/definition.cjs +39 -10
- package/_cjs/data/Either/definition.cjs.map +1 -1
- package/_cjs/data/Either/destructors.cjs +2 -0
- package/_cjs/data/Either/destructors.cjs.map +1 -1
- package/_cjs/data/Either/instances.cjs +123 -40
- package/_cjs/data/Either/instances.cjs.map +1 -1
- package/_cjs/data/Environment/api.cjs +29 -8
- package/_cjs/data/Environment/api.cjs.map +1 -1
- package/_cjs/data/Identity/api.cjs +35 -6
- package/_cjs/data/Identity/api.cjs.map +1 -1
- package/_cjs/data/Identity/definition.cjs +10 -1
- package/_cjs/data/Identity/definition.cjs.map +1 -1
- package/_cjs/data/Identity/instances.cjs +11 -25
- package/_cjs/data/Identity/instances.cjs.map +1 -1
- package/_cjs/data/Interval.cjs +154 -0
- package/_cjs/data/Interval.cjs.map +1 -0
- package/_cjs/data/Maybe/api.cjs +30 -43
- package/_cjs/data/Maybe/api.cjs.map +1 -1
- package/_cjs/data/Maybe/definition.cjs +45 -18
- package/_cjs/data/Maybe/definition.cjs.map +1 -1
- package/_cjs/data/Maybe/destructors.cjs +1 -0
- package/_cjs/data/Maybe/destructors.cjs.map +1 -1
- package/_cjs/data/Maybe/instances.cjs +62 -42
- package/_cjs/data/Maybe/instances.cjs.map +1 -1
- package/_cjs/data/Newtype.cjs +5 -3
- package/_cjs/data/Newtype.cjs.map +1 -1
- package/_cjs/data/Patch/api.cjs +1 -1
- package/_cjs/data/Patch/api.cjs.map +1 -1
- package/_cjs/data/Refinement/api.cjs +0 -4
- package/_cjs/data/Refinement/api.cjs.map +1 -1
- package/_cjs/data/Struct/definition.cjs +4 -2
- package/_cjs/data/Struct/definition.cjs.map +1 -1
- package/_cjs/data/These/api.cjs +299 -0
- package/_cjs/data/These/api.cjs.map +1 -0
- package/_cjs/data/These/constructors.cjs +24 -4
- package/_cjs/data/These/constructors.cjs.map +1 -1
- package/_cjs/data/These/definition.cjs +16 -0
- package/_cjs/data/These/definition.cjs.map +1 -1
- package/_cjs/data/These/destructors.cjs +70 -0
- package/_cjs/data/These/destructors.cjs.map +1 -1
- package/_cjs/data/These/instances.cjs +54 -0
- package/_cjs/data/These/instances.cjs.map +1 -0
- package/_cjs/data/These.cjs +13 -0
- package/_cjs/data/These.cjs.map +1 -1
- package/_cjs/data/bigint/definition.cjs +6 -0
- package/_cjs/data/bigint/definition.cjs.map +1 -0
- package/_cjs/data/bigint/instances.cjs +24 -0
- package/_cjs/data/bigint/instances.cjs.map +1 -0
- package/_cjs/data/bigint.cjs +32 -0
- package/_cjs/data/bigint.cjs.map +1 -0
- package/_cjs/data/boolean/definition.cjs +6 -0
- package/_cjs/data/boolean/definition.cjs.map +1 -0
- package/_cjs/data/boolean/instances.cjs +24 -0
- package/_cjs/data/boolean/instances.cjs.map +1 -0
- package/_cjs/data/boolean.cjs +32 -0
- package/_cjs/data/boolean.cjs.map +1 -0
- package/_cjs/data/number/instances.cjs +18 -5
- package/_cjs/data/number/instances.cjs.map +1 -1
- package/_cjs/data/object/instances.cjs +24 -0
- package/_cjs/data/object/instances.cjs.map +1 -0
- package/_cjs/data/string/instances.cjs +24 -9
- package/_cjs/data/string/instances.cjs.map +1 -1
- package/_cjs/internal/Stack.cjs +4 -0
- package/_cjs/internal/Stack.cjs.map +1 -1
- package/_cjs/json/EitherJson.cjs +33 -0
- package/_cjs/json/EitherJson.cjs.map +1 -0
- package/_cjs/json/MaybeJson.cjs +31 -0
- package/_cjs/json/MaybeJson.cjs.map +1 -0
- package/_cjs/json/TheseJson.cjs +37 -0
- package/_cjs/json/TheseJson.cjs.map +1 -0
- package/_cjs/optics/Optional/definition.cjs +6 -4
- 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 +4 -4
- package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -1
- package/_cjs/optics/Traversal/definition.cjs +17 -12
- package/_cjs/optics/Traversal/definition.cjs.map +1 -1
- package/_cjs/typeclass/Align.cjs +0 -20
- package/_cjs/typeclass/Align.cjs.map +1 -1
- package/_cjs/typeclass/Alt.cjs +5 -15
- package/_cjs/typeclass/Alt.cjs.map +1 -1
- package/_cjs/typeclass/Alternative.cjs +0 -23
- package/_cjs/typeclass/Alternative.cjs.map +1 -1
- package/_cjs/typeclass/Applicative.cjs +0 -22
- package/_cjs/typeclass/Applicative.cjs.map +1 -1
- package/_cjs/typeclass/ApplicativeExcept.cjs +40 -34
- package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
- package/_cjs/typeclass/Apply.cjs +93 -49
- package/_cjs/typeclass/Apply.cjs.map +1 -1
- package/_cjs/typeclass/Chain.cjs +40 -17
- package/_cjs/typeclass/Chain.cjs.map +1 -1
- package/_cjs/typeclass/Closure.cjs +1 -4
- package/_cjs/typeclass/Closure.cjs.map +1 -1
- package/_cjs/typeclass/Eq/definition.cjs +18 -0
- package/_cjs/typeclass/Eq/definition.cjs.map +1 -0
- package/_cjs/typeclass/Eq/derivations.cjs +59 -0
- package/_cjs/typeclass/Eq/derivations.cjs.map +1 -0
- package/_cjs/typeclass/Eq.cjs +11 -13
- package/_cjs/typeclass/Eq.cjs.map +1 -1
- package/_cjs/typeclass/Fail.cjs +6 -12
- package/_cjs/typeclass/Fail.cjs.map +1 -1
- package/_cjs/typeclass/Filterable.cjs +31 -18
- package/_cjs/typeclass/Filterable.cjs.map +1 -1
- package/_cjs/typeclass/FilterableWithIndex.cjs +0 -26
- package/_cjs/typeclass/FilterableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Foldable.cjs +33 -19
- package/_cjs/typeclass/Foldable.cjs.map +1 -1
- package/_cjs/typeclass/FoldableWithIndex.cjs +33 -21
- package/_cjs/typeclass/FoldableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Functor.cjs +19 -16
- package/_cjs/typeclass/Functor.cjs.map +1 -1
- package/_cjs/typeclass/FunctorWithIndex.cjs +0 -21
- package/_cjs/typeclass/FunctorWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Guard/api.cjs +40 -0
- package/_cjs/typeclass/Guard/api.cjs.map +1 -0
- package/_cjs/typeclass/Guard/definition.cjs +40 -0
- package/_cjs/typeclass/Guard/definition.cjs.map +1 -0
- package/_cjs/typeclass/Guard/derivations.cjs +85 -0
- package/_cjs/typeclass/Guard/derivations.cjs.map +1 -0
- package/_cjs/typeclass/Guard.cjs +32 -0
- package/_cjs/typeclass/Guard.cjs.map +1 -0
- package/_cjs/typeclass/HashEq.cjs +3 -3
- package/_cjs/typeclass/HashEq.cjs.map +1 -1
- package/_cjs/typeclass/Monad.cjs +0 -22
- package/_cjs/typeclass/Monad.cjs.map +1 -1
- package/_cjs/typeclass/MonadExcept.cjs +12 -19
- package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
- package/_cjs/typeclass/Monoid.cjs +56 -2
- package/_cjs/typeclass/Monoid.cjs.map +1 -1
- package/_cjs/typeclass/Nil.cjs +10 -0
- package/_cjs/typeclass/Nil.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api/contramap.cjs +2 -4
- package/_cjs/typeclass/Ord/api/contramap.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api/max.cjs +1 -1
- package/_cjs/typeclass/Ord/api/max.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api/min.cjs +1 -1
- package/_cjs/typeclass/Ord/api/min.cjs.map +1 -1
- package/_cjs/typeclass/Ord/definition.cjs +2 -3
- package/_cjs/typeclass/Ord/definition.cjs.map +1 -1
- package/_cjs/typeclass/Ord/instances.cjs +7 -7
- package/_cjs/typeclass/Ord/instances.cjs.map +1 -1
- package/_cjs/typeclass/Pointed.cjs +6 -11
- package/_cjs/typeclass/Pointed.cjs.map +1 -1
- package/_cjs/typeclass/Semialign.cjs +77 -94
- package/_cjs/typeclass/Semialign.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/api.cjs +2 -2
- package/_cjs/typeclass/Semigroup/api.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/definition.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/derivations.cjs +63 -0
- package/_cjs/typeclass/Semigroup/derivations.cjs.map +1 -0
- package/_cjs/typeclass/Semimonoidal.cjs +9 -13
- package/_cjs/typeclass/Semimonoidal.cjs.map +1 -1
- package/_cjs/typeclass/Showable/show.cjs +11 -11
- package/_cjs/typeclass/Showable/show.cjs.map +1 -1
- package/_cjs/typeclass/Traversable.cjs +26 -34
- package/_cjs/typeclass/Traversable.cjs.map +1 -1
- package/_cjs/typeclass/TraversableWithIndex.cjs +7 -38
- package/_cjs/typeclass/TraversableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Witherable.cjs +41 -42
- package/_cjs/typeclass/Witherable.cjs.map +1 -1
- package/_cjs/typeclass/WitherableWithIndex.cjs +41 -50
- package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass.cjs +13 -0
- package/_cjs/typeclass.cjs.map +1 -1
- package/_cjs/util/predicates.cjs +5 -0
- package/_cjs/util/predicates.cjs.map +1 -1
- package/_mjs/collection/Iterable/api/traverseConc.mjs +20 -15
- package/_mjs/collection/Iterable/api/traverseConc.mjs.map +1 -1
- package/_mjs/collection/Iterable/api.mjs +21 -31
- package/_mjs/collection/Iterable/api.mjs.map +1 -1
- package/_mjs/collection/compat/Array/api.mjs +1 -1
- package/_mjs/collection/compat/Array/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api.mjs +35 -36
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/definition.mjs +48 -39
- package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Dictionary/definition.mjs +3 -2
- package/_mjs/collection/immutable/Dictionary/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/api.mjs +26 -66
- package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/definition.mjs +18 -15
- package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/api.mjs +5 -5
- package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api/chunksOf.mjs +10 -0
- package/_mjs/collection/immutable/ImmutableArray/api/chunksOf.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs +9 -0
- package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs +9 -0
- package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs +21 -0
- package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +229 -326
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs +11 -10
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs +151 -138
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray.mjs +7 -1
- package/_mjs/collection/immutable/ImmutableArray.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +113 -145
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs +7 -7
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs +20 -2
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs +4 -3
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +46 -67
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/List/api.mjs +4 -5
- package/_mjs/collection/immutable/List/api.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree/api.mjs +447 -0
- package/_mjs/collection/immutable/RoseTree/api.mjs.map +1 -0
- package/_mjs/collection/immutable/RoseTree/definition.mjs +35 -0
- package/_mjs/collection/immutable/RoseTree/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/RoseTree.mjs +4 -0
- package/_mjs/collection/immutable/RoseTree.mjs.map +1 -0
- package/_mjs/collection/immutable/SortedMap/api.mjs +65 -65
- package/_mjs/collection/immutable/SortedMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/api.mjs +59 -15
- package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/definition.mjs +12 -11
- package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -1
- package/_mjs/collection/mutable/HashMap.mjs +5 -5
- package/_mjs/collection/mutable/HashMap.mjs.map +1 -1
- package/_mjs/collection/mutable/HashSet.mjs +4 -4
- package/_mjs/collection/mutable/HashSet.mjs.map +1 -1
- package/_mjs/control/Eval/api.mjs +5 -2
- package/_mjs/control/Eval/api.mjs.map +1 -1
- package/_mjs/control/Eval/definition.mjs +1 -0
- package/_mjs/control/Eval/definition.mjs.map +1 -1
- package/_mjs/control/Eval/instance.mjs +15 -18
- package/_mjs/control/Eval/instance.mjs.map +1 -1
- package/_mjs/control/Z/definition.mjs +2 -0
- package/_mjs/control/Z/definition.mjs.map +1 -1
- package/_mjs/control/Z/instances.mjs +7 -8
- package/_mjs/control/Z/instances.mjs.map +1 -1
- package/_mjs/data/Branded/definition.mjs +18 -0
- package/_mjs/data/Branded/definition.mjs.map +1 -0
- package/_mjs/data/Branded/derivations.mjs +39 -0
- package/_mjs/data/Branded/derivations.mjs.map +1 -0
- package/_mjs/data/Branded.mjs +4 -0
- package/_mjs/data/Branded.mjs.map +1 -0
- package/_mjs/data/CaseClass.mjs +3 -2
- package/_mjs/data/CaseClass.mjs.map +1 -1
- package/_mjs/data/Cause/api/fold.mjs +2 -0
- package/_mjs/data/Cause/api/fold.mjs.map +1 -1
- package/_mjs/data/Cause/api.mjs +20 -0
- package/_mjs/data/Cause/api.mjs.map +1 -1
- package/_mjs/data/Const/api.mjs +3 -3
- package/_mjs/data/Const/api.mjs.map +1 -1
- package/_mjs/data/Const/definition.mjs +13 -1
- package/_mjs/data/Const/definition.mjs.map +1 -1
- package/_mjs/data/Const/instances.mjs +7 -15
- package/_mjs/data/Const/instances.mjs.map +1 -1
- package/_mjs/data/DecodeError/definition.mjs +226 -0
- package/_mjs/data/DecodeError/definition.mjs.map +1 -0
- package/_mjs/data/DecodeError.mjs +3 -0
- package/_mjs/data/DecodeError.mjs.map +1 -0
- package/_mjs/data/Decoder/api.mjs +179 -0
- package/_mjs/data/Decoder/api.mjs.map +1 -0
- package/_mjs/data/Decoder/definition.mjs +24 -0
- package/_mjs/data/Decoder/definition.mjs.map +1 -0
- package/_mjs/data/Decoder.mjs +4 -0
- package/_mjs/data/Decoder.mjs.map +1 -0
- package/_mjs/data/Duration/api.mjs +17 -8
- package/_mjs/data/Duration/api.mjs.map +1 -1
- package/_mjs/data/Either/api/alignWith.mjs +2 -0
- package/_mjs/data/Either/api/alignWith.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +91 -21
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/definition.mjs +25 -5
- package/_mjs/data/Either/definition.mjs.map +1 -1
- package/_mjs/data/Either/destructors.mjs +2 -0
- package/_mjs/data/Either/destructors.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +109 -39
- package/_mjs/data/Either/instances.mjs.map +1 -1
- package/_mjs/data/Environment/api.mjs +23 -7
- package/_mjs/data/Environment/api.mjs.map +1 -1
- package/_mjs/data/Identity/api.mjs +24 -5
- package/_mjs/data/Identity/api.mjs.map +1 -1
- package/_mjs/data/Identity/definition.mjs +3 -1
- package/_mjs/data/Identity/definition.mjs.map +1 -1
- package/_mjs/data/Identity/instances.mjs +12 -18
- package/_mjs/data/Identity/instances.mjs.map +1 -1
- package/_mjs/data/Interval.mjs +114 -0
- package/_mjs/data/Interval.mjs.map +1 -0
- package/_mjs/data/Maybe/api.mjs +30 -35
- package/_mjs/data/Maybe/api.mjs.map +1 -1
- package/_mjs/data/Maybe/definition.mjs +37 -14
- package/_mjs/data/Maybe/definition.mjs.map +1 -1
- package/_mjs/data/Maybe/destructors.mjs +1 -0
- package/_mjs/data/Maybe/destructors.mjs.map +1 -1
- package/_mjs/data/Maybe/instances.mjs +56 -39
- package/_mjs/data/Maybe/instances.mjs.map +1 -1
- package/_mjs/data/Newtype.mjs +4 -3
- package/_mjs/data/Newtype.mjs.map +1 -1
- package/_mjs/data/Patch/api.mjs +1 -1
- package/_mjs/data/Patch/api.mjs.map +1 -1
- package/_mjs/data/Refinement/api.mjs +0 -4
- package/_mjs/data/Refinement/api.mjs.map +1 -1
- package/_mjs/data/Struct/definition.mjs +3 -2
- package/_mjs/data/Struct/definition.mjs.map +1 -1
- package/_mjs/data/These/api.mjs +262 -0
- package/_mjs/data/These/api.mjs.map +1 -0
- package/_mjs/data/These/constructors.mjs +14 -2
- package/_mjs/data/These/constructors.mjs.map +1 -1
- package/_mjs/data/These/definition.mjs +8 -0
- package/_mjs/data/These/definition.mjs.map +1 -1
- package/_mjs/data/These/destructors.mjs +53 -0
- package/_mjs/data/These/destructors.mjs.map +1 -1
- package/_mjs/data/These/instances.mjs +36 -0
- package/_mjs/data/These/instances.mjs.map +1 -0
- package/_mjs/data/These.mjs +1 -0
- package/_mjs/data/These.mjs.map +1 -1
- package/_mjs/data/bigint/definition.mjs +2 -0
- package/_mjs/data/bigint/definition.mjs.map +1 -0
- package/_mjs/data/bigint/instances.mjs +10 -0
- package/_mjs/data/bigint/instances.mjs.map +1 -0
- package/_mjs/data/bigint.mjs +4 -0
- package/_mjs/data/bigint.mjs.map +1 -0
- package/_mjs/data/boolean/definition.mjs +2 -0
- package/_mjs/data/boolean/definition.mjs.map +1 -0
- package/_mjs/data/boolean/instances.mjs +10 -0
- package/_mjs/data/boolean/instances.mjs.map +1 -0
- package/_mjs/data/boolean.mjs +4 -0
- package/_mjs/data/boolean.mjs.map +1 -0
- package/_mjs/data/number/instances.mjs +14 -4
- package/_mjs/data/number/instances.mjs.map +1 -1
- package/_mjs/data/object/instances.mjs +10 -0
- package/_mjs/data/object/instances.mjs.map +1 -0
- package/_mjs/data/string/instances.mjs +20 -8
- package/_mjs/data/string/instances.mjs.map +1 -1
- package/_mjs/internal/Stack.mjs +4 -0
- package/_mjs/internal/Stack.mjs.map +1 -1
- package/_mjs/json/EitherJson.mjs +18 -0
- package/_mjs/json/EitherJson.mjs.map +1 -0
- package/_mjs/json/MaybeJson.mjs +16 -0
- package/_mjs/json/MaybeJson.mjs.map +1 -0
- package/_mjs/json/TheseJson.mjs +22 -0
- package/_mjs/json/TheseJson.mjs.map +1 -0
- package/_mjs/optics/Optional/definition.mjs +5 -4
- 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 +5 -4
- package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
- package/_mjs/optics/Traversal/definition.mjs +14 -12
- package/_mjs/optics/Traversal/definition.mjs.map +1 -1
- package/_mjs/typeclass/Align.mjs +0 -11
- package/_mjs/typeclass/Align.mjs.map +1 -1
- package/_mjs/typeclass/Alt.mjs +4 -7
- package/_mjs/typeclass/Alt.mjs.map +1 -1
- package/_mjs/typeclass/Alternative.mjs +0 -13
- package/_mjs/typeclass/Alternative.mjs.map +1 -1
- package/_mjs/typeclass/Applicative.mjs +0 -12
- package/_mjs/typeclass/Applicative.mjs.map +1 -1
- package/_mjs/typeclass/ApplicativeExcept.mjs +32 -24
- package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -1
- package/_mjs/typeclass/Apply.mjs +85 -42
- package/_mjs/typeclass/Apply.mjs.map +1 -1
- package/_mjs/typeclass/Chain.mjs +33 -12
- package/_mjs/typeclass/Chain.mjs.map +1 -1
- package/_mjs/typeclass/Closure.mjs +1 -4
- package/_mjs/typeclass/Closure.mjs.map +1 -1
- package/_mjs/typeclass/Eq/definition.mjs +9 -0
- package/_mjs/typeclass/Eq/definition.mjs.map +1 -0
- package/_mjs/typeclass/Eq/derivations.mjs +46 -0
- package/_mjs/typeclass/Eq/derivations.mjs.map +1 -0
- package/_mjs/typeclass/Eq.mjs +1 -11
- package/_mjs/typeclass/Eq.mjs.map +1 -1
- package/_mjs/typeclass/Fail.mjs +5 -7
- package/_mjs/typeclass/Fail.mjs.map +1 -1
- package/_mjs/typeclass/Filterable.mjs +27 -13
- package/_mjs/typeclass/Filterable.mjs.map +1 -1
- package/_mjs/typeclass/FilterableWithIndex.mjs +0 -16
- package/_mjs/typeclass/FilterableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Foldable.mjs +29 -12
- package/_mjs/typeclass/Foldable.mjs.map +1 -1
- package/_mjs/typeclass/FoldableWithIndex.mjs +29 -13
- package/_mjs/typeclass/FoldableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Functor.mjs +16 -9
- package/_mjs/typeclass/Functor.mjs.map +1 -1
- package/_mjs/typeclass/FunctorWithIndex.mjs +0 -12
- package/_mjs/typeclass/FunctorWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Guard/api.mjs +23 -0
- package/_mjs/typeclass/Guard/api.mjs.map +1 -0
- package/_mjs/typeclass/Guard/definition.mjs +23 -0
- package/_mjs/typeclass/Guard/definition.mjs.map +1 -0
- package/_mjs/typeclass/Guard/derivations.mjs +67 -0
- package/_mjs/typeclass/Guard/derivations.mjs.map +1 -0
- package/_mjs/typeclass/Guard.mjs +4 -0
- package/_mjs/typeclass/Guard.mjs.map +1 -0
- package/_mjs/typeclass/HashEq.mjs +3 -3
- package/_mjs/typeclass/HashEq.mjs.map +1 -1
- package/_mjs/typeclass/Monad.mjs +0 -12
- package/_mjs/typeclass/Monad.mjs.map +1 -1
- package/_mjs/typeclass/MonadExcept.mjs +9 -13
- package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
- package/_mjs/typeclass/Monoid.mjs +50 -1
- package/_mjs/typeclass/Monoid.mjs.map +1 -1
- package/_mjs/typeclass/Nil.mjs +8 -1
- package/_mjs/typeclass/Nil.mjs.map +1 -1
- package/_mjs/typeclass/Ord/api/contramap.mjs +2 -4
- package/_mjs/typeclass/Ord/api/contramap.mjs.map +1 -1
- package/_mjs/typeclass/Ord/api/max.mjs +1 -1
- package/_mjs/typeclass/Ord/api/max.mjs.map +1 -1
- package/_mjs/typeclass/Ord/api/min.mjs +1 -1
- package/_mjs/typeclass/Ord/api/min.mjs.map +1 -1
- package/_mjs/typeclass/Ord/definition.mjs +2 -3
- package/_mjs/typeclass/Ord/definition.mjs.map +1 -1
- package/_mjs/typeclass/Ord/instances.mjs +7 -7
- package/_mjs/typeclass/Ord/instances.mjs.map +1 -1
- package/_mjs/typeclass/Pointed.mjs +5 -4
- package/_mjs/typeclass/Pointed.mjs.map +1 -1
- package/_mjs/typeclass/Semialign.mjs +67 -74
- package/_mjs/typeclass/Semialign.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/api.mjs +2 -2
- package/_mjs/typeclass/Semigroup/api.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/definition.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/derivations.mjs +50 -0
- package/_mjs/typeclass/Semigroup/derivations.mjs.map +1 -0
- package/_mjs/typeclass/Semigroup.mjs +1 -1
- package/_mjs/typeclass/Semimonoidal.mjs +8 -6
- package/_mjs/typeclass/Semimonoidal.mjs.map +1 -1
- package/_mjs/typeclass/Showable/show.mjs +11 -11
- package/_mjs/typeclass/Showable/show.mjs.map +1 -1
- package/_mjs/typeclass/Traversable.mjs +25 -24
- package/_mjs/typeclass/Traversable.mjs.map +1 -1
- package/_mjs/typeclass/TraversableWithIndex.mjs +6 -24
- package/_mjs/typeclass/TraversableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Witherable.mjs +39 -32
- package/_mjs/typeclass/Witherable.mjs.map +1 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs +39 -37
- package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass.mjs +1 -0
- package/_mjs/typeclass.mjs.map +1 -1
- package/_mjs/util/predicates.mjs +3 -0
- package/_mjs/util/predicates.mjs.map +1 -1
- package/_src/collection/Iterable/api/traverseConc.ts +21 -29
- package/_src/collection/Iterable/api.ts +20 -34
- package/_src/collection/compat/Array/api.ts +1 -1
- package/_src/collection/immutable/Conc/api.ts +26 -46
- package/_src/collection/immutable/Conc/definition.ts +19 -8
- package/_src/collection/immutable/Dictionary/definition.ts +1 -1
- package/_src/collection/immutable/HashMap/api.ts +24 -81
- package/_src/collection/immutable/HashMap/definition.ts +7 -9
- package/_src/collection/immutable/HashMap/internal.ts +1 -1
- package/_src/collection/immutable/HashSet/api.ts +4 -4
- package/_src/collection/immutable/ImmutableArray/api/chunksOf.ts +6 -0
- package/_src/collection/immutable/ImmutableArray/api/slice.ts +6 -0
- package/_src/collection/immutable/ImmutableArray/api/splitAt.ts +6 -0
- package/_src/collection/immutable/ImmutableArray/api/splitWhere.ts +18 -0
- package/_src/collection/immutable/ImmutableArray/api.ts +181 -267
- package/_src/collection/immutable/ImmutableArray/definition.ts +6 -8
- package/_src/collection/immutable/ImmutableArray/instances.ts +156 -134
- package/_src/collection/immutable/ImmutableArray.ts +7 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +87 -157
- package/_src/collection/immutable/ImmutableNonEmptyArray/constructors.ts +2 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +18 -6
- package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +39 -49
- package/_src/collection/immutable/List/api.ts +2 -6
- package/_src/collection/immutable/RoseTree/api.ts +272 -0
- package/_src/collection/immutable/RoseTree/definition.ts +29 -0
- package/_src/collection/immutable/RoseTree.ts +4 -0
- package/_src/collection/immutable/SortedMap/api.ts +56 -53
- package/_src/collection/immutable/Vector/api.ts +57 -17
- package/_src/collection/immutable/Vector/definition.ts +10 -0
- package/_src/collection/mutable/HashMap.ts +5 -5
- package/_src/collection/mutable/HashSet.ts +4 -4
- package/_src/control/Eval/api.ts +5 -1
- package/_src/control/Eval/definition.ts +5 -8
- package/_src/control/Eval/instance.ts +16 -15
- package/_src/control/Z/definition.ts +26 -19
- package/_src/control/Z/instances.ts +9 -8
- package/_src/data/Branded/definition.ts +47 -0
- package/_src/data/Branded/derivations.ts +57 -0
- package/_src/data/Branded.ts +4 -0
- package/_src/data/CaseClass.ts +2 -2
- package/_src/data/Cause/api/fold.ts +1 -0
- package/_src/data/Cause/api.ts +18 -0
- package/_src/data/Const/api.ts +3 -3
- package/_src/data/Const/definition.ts +22 -5
- package/_src/data/Const/instances.ts +12 -21
- package/_src/data/DecodeError/definition.ts +227 -0
- package/_src/data/DecodeError.ts +3 -0
- package/_src/data/Decoder/api.ts +198 -0
- package/_src/data/Decoder/definition.ts +25 -0
- package/_src/data/Decoder.ts +4 -0
- package/_src/data/Duration/api.ts +21 -14
- package/_src/data/Either/api/alignWith.ts +2 -0
- package/_src/data/Either/api.ts +85 -30
- package/_src/data/Either/definition.ts +41 -19
- package/_src/data/Either/destructors.ts +1 -0
- package/_src/data/Either/instances.ts +102 -51
- package/_src/data/Environment/api.ts +19 -4
- package/_src/data/Identity/api.ts +19 -4
- package/_src/data/Identity/definition.ts +7 -3
- package/_src/data/Identity/instances.ts +15 -8
- package/_src/data/Interval.ts +103 -0
- package/_src/data/Maybe/api.ts +21 -31
- package/_src/data/Maybe/definition.ts +31 -19
- package/_src/data/Maybe/destructors.ts +1 -0
- package/_src/data/Maybe/instances.ts +61 -34
- package/_src/data/Newtype.ts +11 -32
- package/_src/data/Patch/api.ts +1 -1
- package/_src/data/Refinement/api.ts +4 -2
- package/_src/data/Struct/definition.ts +1 -1
- package/_src/data/These/api.ts +184 -0
- package/_src/data/These/constructors.ts +10 -0
- package/_src/data/These/definition.ts +7 -0
- package/_src/data/These/destructors.ts +45 -0
- package/_src/data/These/instances.ts +43 -0
- package/_src/data/These.ts +1 -0
- package/_src/data/bigint/definition.ts +13 -0
- package/_src/data/bigint/instances.ts +8 -0
- package/_src/data/bigint.ts +4 -0
- package/_src/data/boolean/definition.ts +13 -0
- package/_src/data/boolean/instances.ts +8 -0
- package/_src/data/boolean.ts +4 -0
- package/_src/data/number/instances.ts +13 -3
- package/_src/data/object/instances.ts +7 -0
- package/_src/data/string/instances.ts +17 -5
- package/_src/internal/Stack.ts +4 -0
- package/_src/json/EitherJson.ts +28 -0
- package/_src/json/MaybeJson.ts +27 -0
- package/_src/json/TheseJson.ts +31 -0
- package/_src/optics/Optional/definition.ts +2 -2
- package/_src/optics/Traversal/api/compose.ts +1 -1
- package/_src/optics/Traversal/api/fromTraversable.ts +15 -41
- package/_src/optics/Traversal/definition.ts +21 -23
- package/_src/typeclass/Align.ts +4 -18
- package/_src/typeclass/Alt.ts +59 -90
- package/_src/typeclass/Alternative.ts +4 -20
- package/_src/typeclass/Applicative.ts +3 -23
- package/_src/typeclass/ApplicativeExcept.ts +94 -193
- package/_src/typeclass/Apply.ts +319 -509
- package/_src/typeclass/Chain.ts +127 -199
- package/_src/typeclass/Closure.ts +4 -20
- package/_src/typeclass/Eq/definition.ts +20 -0
- package/_src/typeclass/Eq/derivations.ts +61 -0
- package/_src/typeclass/Eq.ts +2 -36
- package/_src/typeclass/Fail.ts +28 -27
- package/_src/typeclass/Filterable.ts +70 -117
- package/_src/typeclass/FilterableWithIndex.ts +27 -131
- package/_src/typeclass/Foldable.ts +35 -52
- package/_src/typeclass/FoldableWithIndex.ts +40 -75
- package/_src/typeclass/Functor.ts +21 -59
- package/_src/typeclass/FunctorWithIndex.ts +6 -34
- package/_src/typeclass/Guard/api.ts +32 -0
- package/_src/typeclass/Guard/definition.ts +23 -0
- package/_src/typeclass/Guard/derivations.ts +80 -0
- package/_src/typeclass/Guard.ts +5 -0
- package/_src/typeclass/HashEq.ts +3 -4
- package/_src/typeclass/Monad.ts +3 -18
- package/_src/typeclass/MonadExcept.ts +9 -32
- package/_src/typeclass/Monoid.ts +60 -2
- package/_src/typeclass/Nil.ts +26 -17
- package/_src/typeclass/Ord/api/contramap.ts +2 -4
- package/_src/typeclass/Ord/api/max.ts +1 -1
- package/_src/typeclass/Ord/api/min.ts +1 -1
- package/_src/typeclass/Ord/definition.ts +3 -19
- package/_src/typeclass/Ord/instances.ts +6 -6
- package/_src/typeclass/Pointed.ts +29 -25
- package/_src/typeclass/Semialign.ts +308 -444
- package/_src/typeclass/Semigroup/api.ts +2 -2
- package/_src/typeclass/Semigroup/definition.ts +2 -6
- package/_src/typeclass/Semigroup/derivations.ts +64 -0
- package/_src/typeclass/Semigroup.ts +1 -1
- package/_src/typeclass/Semimonoidal.ts +55 -84
- package/_src/typeclass/Showable/show.ts +6 -8
- package/_src/typeclass/Traversable.ts +67 -157
- package/_src/typeclass/TraversableWithIndex.ts +37 -127
- package/_src/typeclass/Witherable.ts +120 -279
- package/_src/typeclass/WitherableWithIndex.ts +129 -337
- package/_src/typeclass.ts +2 -0
- package/_src/util/predicates.ts +4 -0
- package/collection/Iterable/api/traverseConc.d.ts +6 -4
- package/collection/Iterable/api.d.ts +5 -13
- package/collection/immutable/Conc/api.d.ts +15 -23
- package/collection/immutable/Conc/definition.d.ts +14 -7
- package/collection/immutable/Dictionary/definition.d.ts +1 -1
- package/collection/immutable/HashMap/api.d.ts +15 -27
- package/collection/immutable/HashMap/definition.d.ts +7 -9
- package/collection/immutable/HashMap/internal.d.ts +2 -2
- package/collection/immutable/HashSet/definition.d.ts +1 -0
- package/collection/immutable/ImmutableArray/api/chunksOf.d.ts +6 -0
- package/collection/immutable/ImmutableArray/api/slice.d.ts +6 -0
- package/collection/immutable/ImmutableArray/api/splitAt.d.ts +6 -0
- package/collection/immutable/ImmutableArray/api/splitWhere.d.ts +7 -0
- package/collection/immutable/ImmutableArray/api.d.ts +42 -119
- package/collection/immutable/ImmutableArray/definition.d.ts +6 -7
- package/collection/immutable/ImmutableArray/instances.d.ts +86 -17
- package/collection/immutable/ImmutableArray.d.ts +4 -0
- package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +27 -48
- package/collection/immutable/ImmutableNonEmptyArray/constructors.d.ts +2 -1
- package/collection/immutable/ImmutableNonEmptyArray/definition.d.ts +15 -7
- package/collection/immutable/ImmutableNonEmptyArray/instances.d.ts +1 -1
- package/collection/immutable/List/api.d.ts +1 -2
- package/collection/immutable/RoseTree/api.d.ts +63 -0
- package/collection/immutable/RoseTree/definition.d.ts +24 -0
- package/collection/immutable/RoseTree.d.ts +2 -0
- package/collection/immutable/SortedMap/api.d.ts +2 -1
- package/collection/immutable/SortedMap/iterator.d.ts +1 -1
- package/collection/immutable/Vector/api.d.ts +31 -8
- package/collection/immutable/Vector/definition.d.ts +13 -0
- package/collection/mutable/HashMap.d.ts +2 -1
- package/collection/mutable/HashSet.d.ts +1 -0
- package/collection/mutable/ListBuffer.d.ts +1 -0
- package/control/Eval/api.d.ts +1 -0
- package/control/Eval/definition.d.ts +5 -7
- package/control/Eval/instance.d.ts +4 -1
- package/control/Z/definition.d.ts +23 -17
- package/control/Z/instances.d.ts +4 -3
- package/data/Branded/definition.d.ts +36 -0
- package/data/Branded/derivations.d.ts +24 -0
- package/data/Branded.d.ts +2 -0
- package/data/Cause/api.d.ts +7 -1
- package/data/Const/api.d.ts +1 -1
- package/data/Const/definition.d.ts +24 -7
- package/data/Const/instances.d.ts +4 -12
- package/data/DecodeError/definition.d.ts +141 -0
- package/data/DecodeError.d.ts +1 -0
- package/data/Decoder/api.d.ts +65 -0
- package/data/Decoder/definition.d.ts +25 -0
- package/data/Decoder.d.ts +2 -0
- package/data/Duration/api.d.ts +12 -8
- package/data/Either/api.d.ts +29 -17
- package/data/Either/definition.d.ts +32 -14
- package/data/Either/instances.d.ts +26 -11
- package/data/Environment/api.d.ts +5 -0
- package/data/Exit/definition.d.ts +1 -0
- package/data/Identity/api.d.ts +11 -0
- package/data/Identity/definition.d.ts +8 -2
- package/data/Identity/instances.d.ts +5 -9
- package/data/Interval.d.ts +71 -0
- package/data/Maybe/api.d.ts +3 -17
- package/data/Maybe/definition.d.ts +23 -14
- package/data/Maybe/instances.d.ts +14 -8
- package/data/Newtype.d.ts +8 -9
- package/data/Refinement/api.d.ts +2 -0
- package/data/Struct/definition.d.ts +1 -1
- package/data/These/api.d.ts +73 -0
- package/data/These/constructors.d.ts +7 -1
- package/data/These/definition.d.ts +5 -0
- package/data/These/destructors.d.ts +27 -1
- package/data/These/instances.d.ts +13 -0
- package/data/These.d.ts +1 -0
- package/data/bigint/definition.d.ts +13 -0
- package/data/bigint/instances.d.ts +7 -0
- package/data/bigint.d.ts +2 -0
- package/data/boolean/definition.d.ts +13 -0
- package/data/boolean/instances.d.ts +7 -0
- package/data/boolean.d.ts +2 -0
- package/data/number/instances.d.ts +8 -0
- package/data/object/instances.d.ts +7 -0
- package/data/string/instances.d.ts +10 -0
- package/internal/Stack.d.ts +1 -0
- package/json/EitherJson.d.ts +24 -0
- package/json/MaybeJson.d.ts +23 -0
- package/json/TheseJson.d.ts +26 -0
- package/optics/Traversal/api/fromTraversable.d.ts +1 -1
- package/optics/Traversal/definition.d.ts +4 -9
- package/package.json +2 -2
- package/typeclass/Align.d.ts +3 -10
- package/typeclass/Alt.d.ts +6 -19
- package/typeclass/Alternative.d.ts +4 -12
- package/typeclass/Applicative.d.ts +3 -12
- package/typeclass/ApplicativeExcept.d.ts +14 -39
- package/typeclass/Apply.d.ts +41 -72
- package/typeclass/Chain.d.ts +18 -28
- package/typeclass/Closure.d.ts +2 -12
- package/typeclass/Eq/definition.d.ts +17 -0
- package/typeclass/Eq/derivations.d.ts +24 -0
- package/typeclass/Eq.d.ts +2 -27
- package/typeclass/Fail.d.ts +4 -10
- package/typeclass/Filterable.d.ts +30 -51
- package/typeclass/FilterableWithIndex.d.ts +10 -53
- package/typeclass/Foldable.d.ts +19 -31
- package/typeclass/FoldableWithIndex.d.ts +20 -33
- package/typeclass/Functor.d.ts +11 -22
- package/typeclass/FunctorWithIndex.d.ts +3 -19
- package/typeclass/Guard/api.d.ts +20 -0
- package/typeclass/Guard/definition.d.ts +23 -0
- package/typeclass/Guard/derivations.d.ts +36 -0
- package/typeclass/Guard.d.ts +2 -0
- package/typeclass/HashEq.d.ts +1 -2
- package/typeclass/Monad.d.ts +3 -11
- package/typeclass/MonadExcept.d.ts +6 -17
- package/typeclass/Monoid.d.ts +24 -2
- package/typeclass/Nil.d.ts +7 -8
- package/typeclass/Ord/definition.d.ts +2 -14
- package/typeclass/Pointed.d.ts +4 -10
- package/typeclass/Semialign.d.ts +51 -63
- package/typeclass/Semigroup/definition.d.ts +3 -5
- package/typeclass/Semigroup/derivations.d.ts +25 -0
- package/typeclass/Semimonoidal.d.ts +5 -14
- package/typeclass/Showable/show.d.ts +1 -0
- package/typeclass/Traversable.d.ts +17 -57
- package/typeclass/TraversableWithIndex.d.ts +9 -52
- package/typeclass/Witherable.d.ts +22 -82
- package/typeclass/WitherableWithIndex.d.ts +26 -98
- package/typeclass.d.ts +1 -0
- package/util/predicates.d.ts +1 -0
@@ -19,7 +19,7 @@ export function find_<K, V>(m: SortedMap<K, V>, key: K, direction: 0 | 1 = 0): S
|
|
19
19
|
return {
|
20
20
|
ord: m.ord,
|
21
21
|
[Symbol.iterator]() {
|
22
|
-
const cmp = m.ord.
|
22
|
+
const cmp = m.ord.compare;
|
23
23
|
let n = m.root;
|
24
24
|
const stack: Array<Node<K, V>> = [];
|
25
25
|
while (n) {
|
@@ -124,7 +124,7 @@ export function forEachGt_<K, V>(m: SortedMap<K, V>, min: K, visit: (k: K, v: V)
|
|
124
124
|
* @tsplus fluent fncts.SortedMap get
|
125
125
|
*/
|
126
126
|
export function get_<K, V>(m: SortedMap<K, V>, key: K): Maybe<V> {
|
127
|
-
const cmp = m.ord.
|
127
|
+
const cmp = m.ord.compare;
|
128
128
|
let n = m.root;
|
129
129
|
while (n) {
|
130
130
|
const d = cmp(key, n.key);
|
@@ -151,7 +151,7 @@ export function get_<K, V>(m: SortedMap<K, V>, key: K): Maybe<V> {
|
|
151
151
|
* @tsplus fluent fncts.SortedMap getGt
|
152
152
|
*/
|
153
153
|
export function getGt_<K, V>(m: SortedMap<K, V>, key: K): Maybe<V> {
|
154
|
-
const cmp = m.ord.
|
154
|
+
const cmp = m.ord.compare;
|
155
155
|
let n = m.root;
|
156
156
|
let lastValue = Nothing<V>();
|
157
157
|
while (n) {
|
@@ -175,7 +175,7 @@ export function getGt_<K, V>(m: SortedMap<K, V>, key: K): Maybe<V> {
|
|
175
175
|
* @tsplus fluent fncts.SortedMap getLt
|
176
176
|
*/
|
177
177
|
export function getLt_<K, V>(m: SortedMap<K, V>, key: K): Maybe<V> {
|
178
|
-
const cmp = m.ord.
|
178
|
+
const cmp = m.ord.compare;
|
179
179
|
let n = m.root;
|
180
180
|
let lastValue = Nothing<V>();
|
181
181
|
while (n) {
|
@@ -198,7 +198,7 @@ export function getLt_<K, V>(m: SortedMap<K, V>, key: K): Maybe<V> {
|
|
198
198
|
* @tsplus fluent fncts.SortedMap getLte
|
199
199
|
*/
|
200
200
|
export function getLte_<K, V>(m: SortedMap<K, V>, key: K): Maybe<V> {
|
201
|
-
const cmp = m.ord.
|
201
|
+
const cmp = m.ord.compare;
|
202
202
|
let n = m.root;
|
203
203
|
let lastValue = Nothing<V>();
|
204
204
|
while (n) {
|
@@ -222,7 +222,7 @@ export function getLte_<K, V>(m: SortedMap<K, V>, key: K): Maybe<V> {
|
|
222
222
|
* @tsplus fluent fncts.SortedMap getGte
|
223
223
|
*/
|
224
224
|
export function getGte_<K, V>(m: SortedMap<K, V>, key: K): Maybe<V> {
|
225
|
-
const cmp = m.ord.
|
225
|
+
const cmp = m.ord.compare;
|
226
226
|
let n = m.root;
|
227
227
|
let lastValue = Nothing<V>();
|
228
228
|
while (n) {
|
@@ -251,7 +251,7 @@ export function insert_<K, V>(m: SortedMap<K, V>, key: K, value: V): SortedMap<K
|
|
251
251
|
if (isEmptyNode(m.root)) {
|
252
252
|
return new SortedMap(m.ord, new Node(Color.R, Leaf, key, value, Leaf, 1));
|
253
253
|
}
|
254
|
-
const cmp = m.ord.
|
254
|
+
const cmp = m.ord.compare;
|
255
255
|
const nodeStack: Array<Node<K, V>> = [];
|
256
256
|
const orderStack: Array<Ordering> = [];
|
257
257
|
let n: RBNode<K, V> = m.root;
|
@@ -277,49 +277,52 @@ export function insert_<K, V>(m: SortedMap<K, V>, key: K, value: V): SortedMap<K
|
|
277
277
|
* Inserts an element into the correct position in the map, combining the values of keys of equal ordering
|
278
278
|
* with a `Semigroup` instance
|
279
279
|
*/
|
280
|
-
export function insertWith_<V>(
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
280
|
+
export function insertWith_<K, V>(
|
281
|
+
m: SortedMap<K, V>,
|
282
|
+
key: K,
|
283
|
+
value: V,
|
284
|
+
/** @tsplus auto */ S: Semigroup<V>,
|
285
|
+
): SortedMap<K, V> {
|
286
|
+
if (isEmptyNode(m.root)) {
|
287
|
+
return new SortedMap(m.ord, new Node(Color.R, Leaf, key, value, Leaf, 1));
|
288
|
+
}
|
289
|
+
const com = S.combine;
|
290
|
+
const cmp = m.ord.compare;
|
291
|
+
const nodeStack: Array<Node<K, V>> = [];
|
292
|
+
const orderStack: Array<1 | -1> = [];
|
293
|
+
let n: RBNode<K, V> = m.root;
|
294
|
+
let cv: V | null = null;
|
295
|
+
while (n && !cv) {
|
296
|
+
const d = cmp(key, n.key);
|
297
|
+
nodeStack.push(n);
|
298
|
+
switch (d) {
|
299
|
+
case -1: {
|
300
|
+
orderStack.push(d);
|
301
|
+
n = n.left;
|
302
|
+
break;
|
303
|
+
}
|
304
|
+
case 1: {
|
305
|
+
orderStack.push(d);
|
306
|
+
n = n.right;
|
307
|
+
break;
|
308
|
+
}
|
309
|
+
case 0: {
|
310
|
+
cv = com(n.value, value);
|
311
|
+
break;
|
309
312
|
}
|
310
313
|
}
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
314
|
+
}
|
315
|
+
if (cv) {
|
316
|
+
const u = nodeStack[nodeStack.length - 1]!;
|
317
|
+
const updated = new Node(u.color, u.left, u.key, cv, u.right, u.count);
|
318
|
+
nodeStack[nodeStack.length - 1] = updated;
|
319
|
+
rebuildModifiedPath(nodeStack, orderStack, 0);
|
320
|
+
} else {
|
321
|
+
nodeStack.push(new Node(Color.R, Leaf, key, value, Leaf, 1));
|
322
|
+
rebuildModifiedPath(nodeStack, orderStack);
|
323
|
+
balanceModifiedPath(nodeStack);
|
324
|
+
}
|
325
|
+
return new SortedMap(m.ord, nodeStack[0]!);
|
323
326
|
}
|
324
327
|
|
325
328
|
/**
|
@@ -386,7 +389,7 @@ export function visitLte<K, V, A>(m: SortedMap<K, V>, max: K, visit: (k: K, v: V
|
|
386
389
|
let current: RBNode<K, V> = m.root;
|
387
390
|
const stack: Stack<Node<K, V>> = Stack();
|
388
391
|
let done = false;
|
389
|
-
const cmp = m.ord.
|
392
|
+
const cmp = m.ord.compare;
|
390
393
|
|
391
394
|
while (!done) {
|
392
395
|
if (current) {
|
@@ -416,7 +419,7 @@ export function visitLt<K, V, A>(m: SortedMap<K, V>, max: K, visit: (k: K, v: V)
|
|
416
419
|
let current: RBNode<K, V> = m.root;
|
417
420
|
const stack: Stack<Node<K, V>> = Stack();
|
418
421
|
let done = false;
|
419
|
-
const cmp = m.ord.
|
422
|
+
const cmp = m.ord.compare;
|
420
423
|
|
421
424
|
while (!done) {
|
422
425
|
if (current) {
|
@@ -446,7 +449,7 @@ export function visitGte<K, V, A>(m: SortedMap<K, V>, min: K, visit: (k: K, v: V
|
|
446
449
|
let current: RBNode<K, V> = m.root;
|
447
450
|
const stack: Stack<Node<K, V>> = Stack();
|
448
451
|
let done = false;
|
449
|
-
const cmp = m.ord.
|
452
|
+
const cmp = m.ord.compare;
|
450
453
|
|
451
454
|
while (!done) {
|
452
455
|
if (current) {
|
@@ -479,7 +482,7 @@ export function visitGt<K, V, A>(m: SortedMap<K, V>, min: K, visit: (k: K, v: V)
|
|
479
482
|
let current: RBNode<K, V> = m.root;
|
480
483
|
const stack: Stack<Node<K, V>> = Stack();
|
481
484
|
let done = false;
|
482
|
-
const cmp = m.ord.
|
485
|
+
const cmp = m.ord.compare;
|
483
486
|
|
484
487
|
while (!done) {
|
485
488
|
if (current) {
|
@@ -512,7 +515,7 @@ export function visitBetween<K, V, A>(m: SortedMap<K, V>, min: K, max: K, visit:
|
|
512
515
|
let current: RBNode<K, V> = m.root;
|
513
516
|
const stack: Stack<Node<K, V>> = Stack();
|
514
517
|
let done = false;
|
515
|
-
const cmp = m.ord.
|
518
|
+
const cmp = m.ord.compare;
|
516
519
|
|
517
520
|
while (!done) {
|
518
521
|
if (current) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* eslint-disable prefer-const */
|
2
|
-
import type { MutableVector } from "@fncts/base/collection/immutable/Vector/definition";
|
3
|
-
import type { Eq, Monoid, Ord, Ordering } from "@fncts/base/typeclass";
|
2
|
+
import type { MutableVector, VectorF } from "@fncts/base/collection/immutable/Vector/definition";
|
3
|
+
import type { Eq, Monoid, Ord, Ordering, Traversable, TraversableWithIndex } from "@fncts/base/typeclass";
|
4
4
|
|
5
5
|
import {
|
6
6
|
affixPush,
|
@@ -36,6 +36,7 @@ import {
|
|
36
36
|
nodeNth,
|
37
37
|
nodeNthDense,
|
38
38
|
prependNodeToTree,
|
39
|
+
push,
|
39
40
|
reverseArray,
|
40
41
|
setDepth,
|
41
42
|
setPrefix,
|
@@ -54,6 +55,7 @@ import {
|
|
54
55
|
* @complexity O(n)
|
55
56
|
*
|
56
57
|
* @tsplus fluent fncts.Vector append
|
58
|
+
* @tsplus operator fncts.Vector +
|
57
59
|
*/
|
58
60
|
export function append_<A>(as: Vector<A>, a: A): Vector<A> {
|
59
61
|
const suffixSize = getSuffixSize(as);
|
@@ -111,6 +113,7 @@ export function chunksOf_<A>(as: Vector<A>, size: number): Vector<Vector<A>> {
|
|
111
113
|
*
|
112
114
|
* @complexity O(log(n))
|
113
115
|
* @tsplus fluent fncts.Vector concat
|
116
|
+
* @tsplus operator fncts.Vector + 1
|
114
117
|
*/
|
115
118
|
export function concat_<A, B>(self: Vector<A>, that: Vector<B>): Vector<A | B>;
|
116
119
|
export function concat_<A>(self: Vector<A>, that: Vector<A>): Vector<A> {
|
@@ -267,7 +270,7 @@ function elemCb(value: any, state: ElemState): boolean {
|
|
267
270
|
*/
|
268
271
|
export function elem_<A>(self: Vector<A>) {
|
269
272
|
return (E: Eq<A>) => {
|
270
|
-
const elemState: ElemState = { equals: E.
|
273
|
+
const elemState: ElemState = { equals: E.equals, element: undefined, result: false };
|
271
274
|
return (a: A): boolean => {
|
272
275
|
elemState.element = a;
|
273
276
|
return foldLeftCb(elemCb, elemState, self).result;
|
@@ -506,21 +509,21 @@ export function foldRightWhile_<A, B>(fa: Vector<A>, b: B, cont: Predicate<B>, f
|
|
506
509
|
}
|
507
510
|
|
508
511
|
/**
|
509
|
-
* @tsplus
|
512
|
+
* @tsplus fluent fncts.Vector foldMap
|
510
513
|
*/
|
511
|
-
export function foldMap_<A>(self: Vector<A>) {
|
512
|
-
return
|
513
|
-
(f: (a: A) => M): M =>
|
514
|
-
self.foldMapWithIndex(M)((_, a) => f(a));
|
514
|
+
export function foldMap_<A, M>(self: Vector<A>, f: (a: A) => M, /** @tsplus auto */ M: Monoid<M>): M {
|
515
|
+
return self.foldMapWithIndex((_, a) => f(a), M);
|
515
516
|
}
|
516
517
|
|
517
518
|
/**
|
518
|
-
* @tsplus
|
519
|
+
* @tsplus fluent fncts.Vector foldMapWithIndex
|
519
520
|
*/
|
520
|
-
export function foldMapWithIndex_<A>(
|
521
|
-
|
522
|
-
|
523
|
-
|
521
|
+
export function foldMapWithIndex_<A, M>(
|
522
|
+
self: Vector<A>,
|
523
|
+
f: (i: number, a: A) => M,
|
524
|
+
/** @tsplus auto */ M: Monoid<M>,
|
525
|
+
): M {
|
526
|
+
return self.foldLeftWithIndex(M.nat, (i, b, a) => M.combine(b, f(i, a)));
|
524
527
|
}
|
525
528
|
|
526
529
|
/**
|
@@ -857,6 +860,13 @@ export function prepend_<A>(as: Vector<A>, a: A): Vector<A> {
|
|
857
860
|
}
|
858
861
|
}
|
859
862
|
|
863
|
+
/**
|
864
|
+
* @tsplus operator fncts.Vector +
|
865
|
+
*/
|
866
|
+
export function prependOperator<A>(a: A, as: Vector<A>): Vector<A> {
|
867
|
+
return as.prepend(a);
|
868
|
+
}
|
869
|
+
|
860
870
|
/**
|
861
871
|
* Returns a Vector of numbers between an inclusive lower bound and an exclusive upper bound.
|
862
872
|
*
|
@@ -900,6 +910,13 @@ export function replicate<A>(n: number, a: A): Vector<A> {
|
|
900
910
|
return l;
|
901
911
|
}
|
902
912
|
|
913
|
+
/**
|
914
|
+
* @tsplus getter fncts.Vector reverse
|
915
|
+
*/
|
916
|
+
export function reverse<A>(self: Vector<A>): Vector<A> {
|
917
|
+
return self.foldLeft(Vector.empty(), (vec, elem) => vec.prepend(elem));
|
918
|
+
}
|
919
|
+
|
903
920
|
/**
|
904
921
|
* Folds a function over a Vector from left to right while collecting
|
905
922
|
* all the intermediate steps in a resulting Vector.
|
@@ -1039,10 +1056,10 @@ export function slice_<A>(as: Vector<A>, from: number, to: number): Vector<A> {
|
|
1039
1056
|
}
|
1040
1057
|
|
1041
1058
|
/**
|
1042
|
-
* @tsplus
|
1059
|
+
* @tsplus fluent fncts.Vector sort
|
1043
1060
|
*/
|
1044
|
-
export function sort_<A>(self: Vector<A>) {
|
1045
|
-
return
|
1061
|
+
export function sort_<A>(self: Vector<A>, /** @tsplus auto */ O: Ord<A>): Vector<A> {
|
1062
|
+
return self.sortWith(O.compare);
|
1046
1063
|
}
|
1047
1064
|
|
1048
1065
|
/**
|
@@ -1183,6 +1200,29 @@ export function toList<A>(self: Vector<A>): List<A> {
|
|
1183
1200
|
return buffer.toList;
|
1184
1201
|
}
|
1185
1202
|
|
1203
|
+
/**
|
1204
|
+
* @tsplus fluent fncts.Vector traverseWithIndex
|
1205
|
+
*/
|
1206
|
+
export const traverseWithIndex: TraversableWithIndex<VectorF>["traverseWithIndex"] = (self, f, G) => {
|
1207
|
+
return self.foldLeftWithIndex(G.pure(Vector.emptyPushable()), (i, b, a) =>
|
1208
|
+
b.zipWith(
|
1209
|
+
f(i, a),
|
1210
|
+
(v, b) => {
|
1211
|
+
push(v, b);
|
1212
|
+
return v;
|
1213
|
+
},
|
1214
|
+
G,
|
1215
|
+
),
|
1216
|
+
);
|
1217
|
+
};
|
1218
|
+
|
1219
|
+
/**
|
1220
|
+
* @tsplus fluent fncts.Vector traverse
|
1221
|
+
*/
|
1222
|
+
export const traverse: Traversable<VectorF>["traverse"] = (self, f, G) => {
|
1223
|
+
return self.traverseWithIndex((_, a) => f(a));
|
1224
|
+
};
|
1225
|
+
|
1186
1226
|
/**
|
1187
1227
|
* Returns a new Vector without repeated elements by using the given
|
1188
1228
|
* Eq instance to determine when elements are equal
|
@@ -1191,7 +1231,7 @@ export function toList<A>(self: Vector<A>): List<A> {
|
|
1191
1231
|
* @tsplus getter fncts.Vector uniq
|
1192
1232
|
*/
|
1193
1233
|
export function uniq<A>(as: Vector<A>) {
|
1194
|
-
return (E: Eq<A>) => as.dropRepeatsWith(E.
|
1234
|
+
return (E: Eq<A>) => as.dropRepeatsWith(E.equals);
|
1195
1235
|
}
|
1196
1236
|
|
1197
1237
|
/**
|
@@ -8,6 +8,8 @@ import { ForwardVectorIterator } from "@fncts/base/collection/immutable/Vector/i
|
|
8
8
|
export const VectorTypeId = Symbol.for("fncts.Vector");
|
9
9
|
export type VectorTypeId = typeof VectorTypeId;
|
10
10
|
|
11
|
+
export interface VectorF extends Vector<any> {}
|
12
|
+
|
11
13
|
/**
|
12
14
|
* Represents a Vector of elements.
|
13
15
|
*
|
@@ -16,6 +18,10 @@ export type VectorTypeId = typeof VectorTypeId;
|
|
16
18
|
*/
|
17
19
|
export class Vector<A> implements Iterable<A> {
|
18
20
|
readonly _typeId: VectorTypeId = VectorTypeId;
|
21
|
+
readonly [HKT.F]!: VectorF;
|
22
|
+
readonly [HKT.A]!: () => A;
|
23
|
+
readonly [HKT.T]!: Vector<HKT._A<this>>;
|
24
|
+
readonly [HKT.Ix]!: number
|
19
25
|
constructor(
|
20
26
|
/** @private */
|
21
27
|
readonly bits: number,
|
@@ -48,6 +54,10 @@ export class Vector<A> implements Iterable<A> {
|
|
48
54
|
*/
|
49
55
|
export interface MutableVector<A> {
|
50
56
|
readonly _typeId: VectorTypeId;
|
57
|
+
readonly [HKT.F]: VectorF;
|
58
|
+
readonly [HKT.A]: () => A;
|
59
|
+
readonly [HKT.T]: Vector<HKT._A<this>>;
|
60
|
+
readonly [HKT.Ix]: number
|
51
61
|
bits: number;
|
52
62
|
offset: number;
|
53
63
|
length: number;
|
@@ -80,7 +80,7 @@ export class HashMap<K, V> implements Iterable<readonly [K, V]> {
|
|
80
80
|
let prev: Node<K, V> | undefined = undefined;
|
81
81
|
let nd: Node<K, V> | undefined = n;
|
82
82
|
while (nd) {
|
83
|
-
if (hash === nd.hash && this.config.
|
83
|
+
if (hash === nd.hash && this.config.equals(key, nd.key)) {
|
84
84
|
previousNode = prev;
|
85
85
|
foundNode = nd;
|
86
86
|
break;
|
@@ -158,7 +158,7 @@ export class HashMap<K, V> implements Iterable<readonly [K, V]> {
|
|
158
158
|
const old = n;
|
159
159
|
let prev: Node<K, V> | undefined = undefined;
|
160
160
|
while (n !== undefined && n.hash <= hash) {
|
161
|
-
if (n.hash === hash && this.config.
|
161
|
+
if (n.hash === hash && this.config.equals(key, n.key)) {
|
162
162
|
const old = n.value;
|
163
163
|
n.value = value;
|
164
164
|
if (getOld) return Just(old);
|
@@ -186,7 +186,7 @@ export class HashMap<K, V> implements Iterable<readonly [K, V]> {
|
|
186
186
|
const nd = this.table[idx];
|
187
187
|
if (nd === undefined) {
|
188
188
|
return undefined;
|
189
|
-
} else if (nd.hash === hash && this.config.
|
189
|
+
} else if (nd.hash === hash && this.config.equals(nd.key, key)) {
|
190
190
|
this.table[idx] = nd.next;
|
191
191
|
this.contentSize -= 1;
|
192
192
|
return nd;
|
@@ -194,7 +194,7 @@ export class HashMap<K, V> implements Iterable<readonly [K, V]> {
|
|
194
194
|
let prev = nd;
|
195
195
|
let next = nd.next;
|
196
196
|
while (next && next.hash <= hash) {
|
197
|
-
if (next.hash === hash && this.config.
|
197
|
+
if (next.hash === hash && this.config.equals(next.key, key)) {
|
198
198
|
prev.next = next.next;
|
199
199
|
this.contentSize -= 1;
|
200
200
|
return next;
|
@@ -221,7 +221,7 @@ export class HashMap<K, V> implements Iterable<readonly [K, V]> {
|
|
221
221
|
private findNode(key: K): Node<K, V> | undefined {
|
222
222
|
const hash = this.computeHash(key);
|
223
223
|
const n = this.table[this.index(hash)];
|
224
|
-
return n === undefined ? n : n.findNode(key, hash, this.config.
|
224
|
+
return n === undefined ? n : n.findNode(key, hash, this.config.equals);
|
225
225
|
}
|
226
226
|
|
227
227
|
private growTable(newLen: number) {
|
@@ -81,7 +81,7 @@ export class HashSet<A> implements Iterable<A> {
|
|
81
81
|
const old = n;
|
82
82
|
let prev: Node<A> | undefined = undefined;
|
83
83
|
while (n !== undefined && n.hash <= hash) {
|
84
|
-
if (n.hash === hash && this.config.
|
84
|
+
if (n.hash === hash && this.config.equals(elem, n.key)) {
|
85
85
|
return false;
|
86
86
|
}
|
87
87
|
prev = n;
|
@@ -102,7 +102,7 @@ export class HashSet<A> implements Iterable<A> {
|
|
102
102
|
const n = this.table[idx];
|
103
103
|
if (n === undefined) {
|
104
104
|
return false;
|
105
|
-
} else if (n.hash === hash && this.config.
|
105
|
+
} else if (n.hash === hash && this.config.equals(n.key, elem)) {
|
106
106
|
this.table[idx] = n.next;
|
107
107
|
this.contentSize -= 1;
|
108
108
|
return true;
|
@@ -110,7 +110,7 @@ export class HashSet<A> implements Iterable<A> {
|
|
110
110
|
let prev = n;
|
111
111
|
let next = n.next;
|
112
112
|
while (next && next.hash <= hash) {
|
113
|
-
if (next.hash === hash && this.config.
|
113
|
+
if (next.hash === hash && this.config.equals(next.key, elem)) {
|
114
114
|
prev.next = next.next;
|
115
115
|
this.contentSize -= 1;
|
116
116
|
return true;
|
@@ -137,7 +137,7 @@ export class HashSet<A> implements Iterable<A> {
|
|
137
137
|
private findNode(key: A): Node<A> | undefined {
|
138
138
|
const hash = this.computeHash(key);
|
139
139
|
const n = this.table[this.index(hash)];
|
140
|
-
return n === undefined ? n : n.findNode(key, hash, this.config.
|
140
|
+
return n === undefined ? n : n.findNode(key, hash, this.config.equals);
|
141
141
|
}
|
142
142
|
|
143
143
|
private growTable(newLen: number) {
|
package/_src/control/Eval/api.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { _A } from "@fncts/base/types";
|
2
2
|
|
3
3
|
import { Chain } from "@fncts/base/control/Eval/definition";
|
4
|
-
import { identity } from "@fncts/base/data/function";
|
4
|
+
import { identity, tuple } from "@fncts/base/data/function";
|
5
5
|
|
6
6
|
/**
|
7
7
|
* @tsplus fluent fncts.control.Eval and
|
@@ -38,6 +38,10 @@ export function zipWith_<A, B, C>(self: Eval<A>, fb: Eval<B>, f: (a: A, b: B) =>
|
|
38
38
|
return self.flatMap((a) => fb.map((b) => f(a, b)));
|
39
39
|
}
|
40
40
|
|
41
|
+
export function zip_<A, B>(self: Eval<A>, fb: Eval<B>): Eval<readonly [A, B]> {
|
42
|
+
return self.zipWith(fb, tuple);
|
43
|
+
}
|
44
|
+
|
41
45
|
/**
|
42
46
|
* @tsplus fluent fncts.control.Eval ap
|
43
47
|
*/
|
@@ -1,12 +1,16 @@
|
|
1
1
|
export const EvalTypeId = Symbol.for("@fncts.base/control/Eval");
|
2
2
|
export type EvalTypeId = typeof EvalTypeId;
|
3
3
|
|
4
|
+
export interface EvalF extends Eval<any> {}
|
5
|
+
|
4
6
|
/**
|
5
7
|
* @tsplus type fncts.control.Eval
|
6
8
|
*/
|
7
9
|
export interface Eval<A> {
|
8
10
|
readonly _typeId: EvalTypeId;
|
9
|
-
|
11
|
+
[HKT.F]?: EvalF;
|
12
|
+
[HKT.A]?: () => A;
|
13
|
+
[HKT.T]?: Eval<HKT._A<this>>;
|
10
14
|
}
|
11
15
|
|
12
16
|
/**
|
@@ -58,10 +62,3 @@ export function concrete(_: Eval<any>): asserts _ is Concrete {
|
|
58
62
|
export function unifyEval<X extends Eval<any>>(self: X): Eval<[X] extends [Eval<infer A>] ? A : never> {
|
59
63
|
return self;
|
60
64
|
}
|
61
|
-
|
62
|
-
export interface EvalF extends HKT {
|
63
|
-
readonly type: Eval<this["A"]>;
|
64
|
-
readonly variance: {
|
65
|
-
readonly A: "-";
|
66
|
-
};
|
67
|
-
}
|
@@ -1,31 +1,32 @@
|
|
1
1
|
import type { EvalF } from "@fncts/base/control/Eval/definition";
|
2
|
+
import type * as P from "@fncts/base/typeclass";
|
2
3
|
|
3
|
-
import { ap_, map_, zipWith_ } from "@fncts/base/control/Eval/api";
|
4
|
+
import { ap_, map_, zip_, zipWith_ } from "@fncts/base/control/Eval/api";
|
4
5
|
import { now } from "@fncts/base/control/Eval/constructors";
|
5
|
-
import * as P from "@fncts/base/typeclass";
|
6
6
|
|
7
7
|
/**
|
8
8
|
* @tsplus static fncts.control.EvalOps Functor
|
9
|
+
* @tsplus implicit
|
9
10
|
*/
|
10
|
-
export const Functor: P.Functor<EvalF> =
|
11
|
-
map_,
|
12
|
-
}
|
11
|
+
export const Functor: P.Functor<EvalF> = {
|
12
|
+
map: map_,
|
13
|
+
};
|
13
14
|
|
14
15
|
/**
|
15
16
|
* @tsplus static fncts.control.EvalOps Apply
|
17
|
+
* @tsplus implicit
|
16
18
|
*/
|
17
|
-
export const Apply: P.Apply<EvalF> =
|
18
|
-
map_,
|
19
|
-
|
20
|
-
zipWith_,
|
21
|
-
}
|
19
|
+
export const Apply: P.Apply<EvalF> = {
|
20
|
+
map: map_,
|
21
|
+
zip: zip_,
|
22
|
+
zipWith: zipWith_,
|
23
|
+
};
|
22
24
|
|
23
25
|
/**
|
24
26
|
* @tsplus static fncts.control.EvalOps Applicative
|
27
|
+
* @tsplus implicit
|
25
28
|
*/
|
26
|
-
export const Applicative: P.Applicative<EvalF> =
|
27
|
-
|
28
|
-
ap_,
|
29
|
-
zipWith_,
|
29
|
+
export const Applicative: P.Applicative<EvalF> = {
|
30
|
+
...Apply,
|
30
31
|
pure: now,
|
31
|
-
}
|
32
|
+
};
|
@@ -1,17 +1,8 @@
|
|
1
|
-
import type { _A, _E, _R, _S1, _S2, _W } from "../../types.js";
|
2
|
-
|
3
1
|
import { hasTypeId } from "../../util/predicates.js";
|
4
2
|
|
5
|
-
export interface ZF extends
|
6
|
-
|
7
|
-
|
8
|
-
readonly W: "_";
|
9
|
-
readonly S: "_";
|
10
|
-
readonly R: "-";
|
11
|
-
readonly E: "+";
|
12
|
-
readonly A: "+";
|
13
|
-
};
|
14
|
-
}
|
3
|
+
export interface ZF extends Z<any, any, any, any, any, any> {}
|
4
|
+
|
5
|
+
export interface ZFixedF extends ZFixed<any, any, any, any, any> {}
|
15
6
|
|
16
7
|
export const ZTypeId = Symbol.for("@principia/base/Z");
|
17
8
|
export type ZTypeId = typeof ZTypeId;
|
@@ -31,18 +22,34 @@ export type ZTypeId = typeof ZTypeId;
|
|
31
22
|
*/
|
32
23
|
export abstract class Z<W, S1, S2, R, E, A> {
|
33
24
|
readonly _typeId: ZTypeId = ZTypeId;
|
34
|
-
readonly
|
35
|
-
readonly
|
36
|
-
readonly
|
37
|
-
readonly
|
38
|
-
readonly
|
39
|
-
readonly
|
25
|
+
readonly [HKT.F]!: ZF;
|
26
|
+
readonly [HKT.W]!: () => W;
|
27
|
+
readonly [HKT.Q]!: (_: S1) => void;
|
28
|
+
readonly [HKT.S]!: () => S2;
|
29
|
+
readonly [HKT.R]!: (_: R) => void;
|
30
|
+
readonly [HKT.E]!: () => E;
|
31
|
+
readonly [HKT.A]!: () => A;
|
32
|
+
readonly [HKT.T]!: Z<HKT._W<this>, HKT._Q<this>, HKT._S<this>, HKT._R<this>, HKT._E<this>, HKT._A<this>>;
|
33
|
+
}
|
34
|
+
|
35
|
+
export interface ZFixed<W, S, R, E, A> {
|
36
|
+
readonly _typeId: ZTypeId;
|
37
|
+
readonly [HKT.F]: ZF;
|
38
|
+
readonly [HKT.W]: () => W;
|
39
|
+
readonly [HKT.Q]: (_: S) => void;
|
40
|
+
readonly [HKT.S]: () => S;
|
41
|
+
readonly [HKT.R]: (_: R) => void;
|
42
|
+
readonly [HKT.E]: () => E;
|
43
|
+
readonly [HKT.A]: () => A;
|
44
|
+
readonly [HKT.T]: Z<HKT._W<this>, HKT._S<this>, HKT._S<this>, HKT._R<this>, HKT._E<this>, HKT._A<this>>;
|
40
45
|
}
|
41
46
|
|
42
47
|
/**
|
43
48
|
* @tsplus unify fncts.control.Z
|
44
49
|
*/
|
45
|
-
export function unifyZ<X extends Z<any, any, any, any, any, any>>(
|
50
|
+
export function unifyZ<X extends Z<any, any, any, any, any, any>>(
|
51
|
+
_: X,
|
52
|
+
): Z<HKT._W<X>, HKT._Q<X>, HKT._S<X>, HKT._R<X>, HKT._E<X>, HKT._A<X>> {
|
46
53
|
return _;
|
47
54
|
}
|
48
55
|
|
@@ -1,14 +1,15 @@
|
|
1
|
-
import type
|
1
|
+
import type * as P from "../../typeclass.js";
|
2
|
+
import type { ZFixedF } from "./definition.js";
|
2
3
|
|
3
|
-
import
|
4
|
-
import { ap_, crossWith_, map_, succeedNow } from "./api.js";
|
4
|
+
import { map_, succeedNow, zip_, zipWith_ } from "./api.js";
|
5
5
|
|
6
6
|
/**
|
7
7
|
* @tsplus static fncts.control.ZOps Applicative
|
8
|
+
* @tsplus implicit
|
8
9
|
*/
|
9
|
-
export const Applicative: P.Applicative<
|
10
|
-
map_,
|
11
|
-
|
12
|
-
|
10
|
+
export const Applicative: P.Applicative<ZFixedF> = {
|
11
|
+
map: map_,
|
12
|
+
zip: zip_,
|
13
|
+
zipWith: zipWith_,
|
13
14
|
pure: succeedNow,
|
14
|
-
}
|
15
|
+
};
|