@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
@@ -1,25 +1,28 @@
|
|
1
1
|
import * as tsplus_module_1 from "@fncts/base/data/These/constructors";
|
2
2
|
import * as tsplus_module_2 from "@fncts/base/collection/immutable/ImmutableArray/constructors";
|
3
|
-
import * as tsplus_module_3 from "@fncts/base/collection/immutable/
|
4
|
-
import * as tsplus_module_4 from "@fncts/base/
|
5
|
-
import * as tsplus_module_5 from "@fncts/base/
|
6
|
-
import * as tsplus_module_6 from "@fncts/base/control/Eval/
|
7
|
-
import * as tsplus_module_7 from "@fncts/base/control/Eval/
|
8
|
-
import * as tsplus_module_8 from "@fncts/base/control/Eval/
|
9
|
-
import * as tsplus_module_9 from "@fncts/base/
|
10
|
-
import * as tsplus_module_10 from "@fncts/base/
|
11
|
-
import * as tsplus_module_11 from "@fncts/base/collection/immutable/
|
12
|
-
import * as tsplus_module_12 from "@fncts/base/collection/immutable/Dictionary/
|
13
|
-
import * as tsplus_module_13 from "@fncts/base/
|
14
|
-
import * as tsplus_module_14 from "@fncts/base/
|
15
|
-
import * as tsplus_module_15 from "@fncts/base/
|
3
|
+
import * as tsplus_module_3 from "@fncts/base/collection/immutable/ImmutableArray/api/slice";
|
4
|
+
import * as tsplus_module_4 from "@fncts/base/collection/immutable/ImmutableNonEmptyArray/definition";
|
5
|
+
import * as tsplus_module_5 from "@fncts/base/data/Maybe/definition";
|
6
|
+
import * as tsplus_module_6 from "@fncts/base/control/Eval/constructors";
|
7
|
+
import * as tsplus_module_7 from "@fncts/base/control/Eval/instance";
|
8
|
+
import * as tsplus_module_8 from "@fncts/base/control/Eval/api";
|
9
|
+
import * as tsplus_module_9 from "@fncts/base/control/Eval/run";
|
10
|
+
import * as tsplus_module_10 from "@fncts/base/data/Maybe/constructors";
|
11
|
+
import * as tsplus_module_11 from "@fncts/base/collection/immutable/ImmutableNonEmptyArray/constructors";
|
12
|
+
import * as tsplus_module_12 from "@fncts/base/collection/immutable/Dictionary/api";
|
13
|
+
import * as tsplus_module_13 from "@fncts/base/collection/immutable/Dictionary/definition";
|
14
|
+
import * as tsplus_module_14 from "@fncts/base/typeclass/Ord/instances";
|
15
|
+
import * as tsplus_module_15 from "@fncts/base/typeclass/Apply";
|
16
|
+
import * as tsplus_module_16 from "@fncts/base/data/Either/destructors";
|
17
|
+
import * as tsplus_module_17 from "@fncts/base/typeclass/Functor";
|
16
18
|
export const alignWith_ = alignWith_1;
|
17
19
|
export const append_ = append_1;
|
20
|
+
export const crossWith_ = crossWith_1;
|
18
21
|
export const flatMapWithIndex_ = flatMapWithIndex_1;
|
19
22
|
export const flatMap_ = flatMap_1;
|
20
23
|
export const flatten = flatten_1;
|
21
|
-
export const chop_ = chop_1;
|
22
24
|
export const concat_ = concat_1;
|
25
|
+
export const elem_ = elem_1;
|
23
26
|
export const everyWithIndex_ = everyWithIndex_1;
|
24
27
|
export const filter_ = filter_1;
|
25
28
|
export const filterWithIndex_ = filterWithIndex_1;
|
@@ -30,16 +33,14 @@ export const findLastMapWithIndex_ = findLastMapWithIndex_1;
|
|
30
33
|
export const foldLeftWithIndex_ = foldLeftWithIndex_1;
|
31
34
|
export const foldLeft_ = foldLeft_1;
|
32
35
|
export const foldLeftWithIndexWhile_ = foldLeftWithIndexWhile_1;
|
33
|
-
export const
|
34
|
-
export const
|
36
|
+
export const fold = fold_1;
|
37
|
+
export const foldMapWithIndex_ = foldMapWithIndex_1;
|
35
38
|
export const foldRightWithIndex_ = foldRightWithIndex_1;
|
36
39
|
export const foldRightWithIndexWhile_ = foldRightWithIndexWhile_1;
|
37
40
|
export const forEach_ = forEach_1;
|
38
41
|
export const get_ = get_1;
|
39
42
|
export const isEmpty = isEmpty_1;
|
40
|
-
export const isNonEmpty = isNonEmpty_1;
|
41
43
|
export const isOutOfBound_ = isOutOfBound_1;
|
42
|
-
export const length = length_1;
|
43
44
|
export const map_ = map_1;
|
44
45
|
export const mapWithIndex_ = mapWithIndex_1;
|
45
46
|
export const mutate_ = mutate_1;
|
@@ -52,14 +53,13 @@ export const rotate_ = rotate_1;
|
|
52
53
|
export const sort = sort_1;
|
53
54
|
export const spanIndexLeft_ = spanIndexLeft_1;
|
54
55
|
export const spanIndexRight_ = spanIndexRight_1;
|
55
|
-
export const slice_ = slice_1;
|
56
|
-
export const splitAt_ = splitAt_1;
|
57
56
|
export const unsafeGet = unsafeGet_1;
|
58
57
|
export const unsafeAsMutable = unsafeAsMutable_1;
|
59
58
|
export const unsafeDeleteAt_ = unsafeDeleteAt_1;
|
60
59
|
export const unsafeInsertAt_ = unsafeInsertAt_1;
|
61
60
|
export const unsafeModifyAt_ = unsafeModifyAt_1;
|
62
61
|
export const unsafeUpdateAt_ = unsafeUpdateAt_1;
|
62
|
+
export const witherWithIndex_ = witherWithIndex_1;
|
63
63
|
export const zipWith_ = zipWith_1;
|
64
64
|
import { identity, tuple } from "@fncts/base/data/function";
|
65
65
|
import * as P from "@fncts/base/typeclass";
|
@@ -135,19 +135,28 @@ function append_1(self, last) {
|
|
135
135
|
*/
|
136
136
|
|
137
137
|
|
138
|
-
|
138
|
+
function crossWith_1(self, fb, f) {
|
139
139
|
return flatMap_1(self, a => map_1(fb, b => f(a, b)));
|
140
140
|
}
|
141
|
+
/**
|
142
|
+
* @tsplus fluent fncts.ImmutableArray cross
|
143
|
+
*/
|
144
|
+
|
145
|
+
|
146
|
+
export function cross_(self, fb) {
|
147
|
+
return crossWith_1(self, fb, tuple);
|
148
|
+
}
|
141
149
|
/**
|
142
150
|
* @tsplus static fncts.ImmutableArrayOps chainRecDepthFirst
|
143
151
|
*/
|
144
152
|
|
145
153
|
export function chainRecDepthFirst(a, f) {
|
146
|
-
const buffer = unsafeAsMutable_1(
|
154
|
+
const buffer = unsafeAsMutable_1(tsplus_module_3.slice_(f(a)));
|
147
155
|
const out = [];
|
148
156
|
|
149
157
|
while (buffer.length > 0) {
|
150
158
|
const e = buffer.shift();
|
159
|
+
void 0;
|
151
160
|
|
152
161
|
if (e._tag === "Left"
|
153
162
|
/* EitherTag.Left */
|
@@ -170,6 +179,8 @@ export function chainRecBreadthFirst(a, f) {
|
|
170
179
|
const out = [];
|
171
180
|
|
172
181
|
function go(e) {
|
182
|
+
void 0;
|
183
|
+
|
173
184
|
if (e._tag === "Left") {
|
174
185
|
forEach_1(f(e.left), v => buffer.push(v));
|
175
186
|
} else {
|
@@ -247,11 +258,11 @@ function flatten_1(self) {
|
|
247
258
|
*/
|
248
259
|
|
249
260
|
|
250
|
-
function
|
261
|
+
export function chop_(as, f) {
|
251
262
|
const result = [];
|
252
263
|
let cs = as;
|
253
264
|
|
254
|
-
while (
|
265
|
+
while (tsplus_module_4.isNonEmpty(cs)) {
|
255
266
|
const [b, c] = f(cs);
|
256
267
|
result.push(b);
|
257
268
|
cs = c;
|
@@ -259,15 +270,7 @@ function chop_1(as, f) {
|
|
259
270
|
|
260
271
|
return tsplus_module_2.asImmutableArray(result);
|
261
272
|
}
|
262
|
-
|
263
273
|
export const chop = f => as => chop_(as, f);
|
264
|
-
/**
|
265
|
-
* @tsplus fluent fncts.ImmutableArray chunksOf
|
266
|
-
*/
|
267
|
-
|
268
|
-
export function chunksOf_(self, n) {
|
269
|
-
return chop_1(self, as => tsplus_module_3.splitAt_(as, n));
|
270
|
-
}
|
271
274
|
/**
|
272
275
|
* @tsplus fluent fncts.ImmutableArray collectWhile
|
273
276
|
*/
|
@@ -275,10 +278,10 @@ export function chunksOf_(self, n) {
|
|
275
278
|
export function collectWhile_(as, f) {
|
276
279
|
const result = [];
|
277
280
|
|
278
|
-
for (let i = 0; i <
|
281
|
+
for (let i = 0; i < tsplus_module_4.length(as); i++) {
|
279
282
|
const o = f(as._array[i]);
|
280
283
|
|
281
|
-
if (
|
284
|
+
if (tsplus_module_5.isJust(o)) {
|
282
285
|
result.push(o.value);
|
283
286
|
} else {
|
284
287
|
break;
|
@@ -290,19 +293,18 @@ export function collectWhile_(as, f) {
|
|
290
293
|
|
291
294
|
function comprehensionLoop(scope, input, f, g) {
|
292
295
|
if (input.length === 0) {
|
293
|
-
return g(...scope) ?
|
296
|
+
return g(...scope) ? tsplus_module_6.now(tsplus_module_2.make(f(...scope))) : tsplus_module_6.now(tsplus_module_2.empty());
|
294
297
|
} else {
|
295
|
-
return
|
298
|
+
return tsplus_module_8.map_(traverse_1(input[0], a => comprehensionLoop(append_1(scope, a), input.slice(1), f, g), tsplus_module_7.Applicative), rs => flatten_1(rs));
|
296
299
|
}
|
297
300
|
}
|
298
301
|
|
299
302
|
export function comprehension(input, f, g = () => true) {
|
300
|
-
return
|
303
|
+
return tsplus_module_9.run(comprehensionLoop(tsplus_module_2.empty(), input, f, g));
|
301
304
|
}
|
302
305
|
/**
|
303
306
|
* @tsplus fluent fncts.ImmutableArray concat
|
304
307
|
* @tsplus operator fncts.ImmutableArray +
|
305
|
-
* @tsplus operator fncts.base.MutableArray +
|
306
308
|
*/
|
307
309
|
|
308
310
|
function concat_1(self, that) {
|
@@ -336,85 +338,69 @@ function concat_1(self, that) {
|
|
336
338
|
|
337
339
|
|
338
340
|
export function deleteAt_(as, i) {
|
339
|
-
return isOutOfBound_1(as, i) ?
|
340
|
-
}
|
341
|
-
/**
|
342
|
-
* @constrained
|
343
|
-
*/
|
344
|
-
|
345
|
-
export function difference_(E) {
|
346
|
-
const elemE_ = elem_(E);
|
347
|
-
return (self, ys) => filter_1(self, a => !elemE_(ys, a));
|
341
|
+
return isOutOfBound_1(as, i) ? tsplus_module_10.nothing() : tsplus_module_10.just(unsafeDeleteAt_1(as, i));
|
348
342
|
}
|
349
343
|
/**
|
350
|
-
* @tsplus
|
344
|
+
* @tsplus fluent fncts.ImmutableArray difference
|
351
345
|
*/
|
352
346
|
|
353
|
-
export function
|
354
|
-
|
347
|
+
export function difference_(self, ys,
|
348
|
+
/** @tsplus auto */
|
349
|
+
E) {
|
350
|
+
return filter_1(self, a => !elem_1(ys, a, E));
|
355
351
|
}
|
356
352
|
/**
|
357
353
|
* @tsplus fluent fncts.ImmutableArray drop
|
358
354
|
*/
|
359
355
|
|
360
356
|
export function drop_(self, n) {
|
361
|
-
return
|
357
|
+
return tsplus_module_3.slice_(self, n);
|
362
358
|
}
|
363
359
|
/**
|
364
360
|
* @tsplus fluent fncts.ImmutableArray dropLast
|
365
361
|
*/
|
366
362
|
|
367
363
|
export function dropLast_(self, n) {
|
368
|
-
return
|
364
|
+
return tsplus_module_3.slice_(self, 0, tsplus_module_4.length(self) - n);
|
369
365
|
}
|
370
366
|
/**
|
371
367
|
* @tsplus fluent fncts.ImmutableArray dropWhile
|
372
368
|
*/
|
373
369
|
|
374
370
|
export function dropWhile_(self, p) {
|
375
|
-
return
|
371
|
+
return tsplus_module_3.slice_(self, spanIndexLeft_1(self, p));
|
376
372
|
}
|
377
373
|
/**
|
378
374
|
* @tsplus fluent fncts.ImmutableArray dropLastWhile
|
379
375
|
*/
|
380
376
|
|
381
377
|
export function dropLastWhile_(as, p) {
|
382
|
-
return
|
378
|
+
return tsplus_module_3.slice_(as, 0, spanIndexRight_1(as, p) + 1);
|
383
379
|
}
|
384
380
|
/**
|
385
381
|
* Test if a value is a member of an array. Takes an `Eq<A>` as a single
|
386
382
|
* argument which returns the function to use to search for a value of type `A` in
|
387
383
|
* an array of type `ImmutableArray<A>`.
|
388
384
|
*
|
389
|
-
* @
|
385
|
+
* @tsplus fluent fncts.ImmutableArray elem
|
390
386
|
*/
|
391
387
|
|
392
|
-
|
393
|
-
|
394
|
-
|
388
|
+
function elem_1(as, a,
|
389
|
+
/** @tsplus auto */
|
390
|
+
E) {
|
391
|
+
const predicate = element => E.equals(element, a);
|
395
392
|
|
396
|
-
|
393
|
+
const len = tsplus_module_4.length(as);
|
397
394
|
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
}
|
395
|
+
for (let i = 0; i < len; i++) {
|
396
|
+
if (predicate(as._array[i])) {
|
397
|
+
return true;
|
402
398
|
}
|
399
|
+
}
|
403
400
|
|
404
|
-
|
405
|
-
};
|
401
|
+
return false;
|
406
402
|
}
|
407
|
-
/**
|
408
|
-
* Test if a value is a member of an array. Takes an `Eq<A>` as a single
|
409
|
-
* argument which returns the function to use to search for a value of type `A` in
|
410
|
-
* an array of type `ImmutableArray<A>`.
|
411
|
-
*
|
412
|
-
* @tsplus getter fncts.ImmutableArray elem
|
413
|
-
*/
|
414
403
|
|
415
|
-
export function elemSelf(self) {
|
416
|
-
return E => a => elem_(E)(self, a);
|
417
|
-
}
|
418
404
|
export function every_(self, p) {
|
419
405
|
return everyWithIndex_1(self, (_, a) => p(a));
|
420
406
|
}
|
@@ -423,7 +409,7 @@ function everyWithIndex_1(self, p) {
|
|
423
409
|
let result = true;
|
424
410
|
let i = 0;
|
425
411
|
|
426
|
-
while (result && i <
|
412
|
+
while (result && i < tsplus_module_4.length(self)) {
|
427
413
|
result = p(i, self._array[i]);
|
428
414
|
i++;
|
429
415
|
}
|
@@ -439,7 +425,7 @@ export function exists_(self, p) {
|
|
439
425
|
let result = false;
|
440
426
|
let i = 0;
|
441
427
|
|
442
|
-
while (!result && i <
|
428
|
+
while (!result && i < tsplus_module_4.length(self)) {
|
443
429
|
result = p(self._array[i]);
|
444
430
|
i++;
|
445
431
|
}
|
@@ -454,7 +440,7 @@ function filter_1(self, p) {
|
|
454
440
|
function filterWithIndex_1(self, p) {
|
455
441
|
const result = [];
|
456
442
|
|
457
|
-
for (let i = 0; i <
|
443
|
+
for (let i = 0; i < tsplus_module_4.length(self); i++) {
|
458
444
|
const a = self._array[i];
|
459
445
|
|
460
446
|
if (p(i, a)) {
|
@@ -472,10 +458,10 @@ function filterWithIndex_1(self, p) {
|
|
472
458
|
function filterMapWithIndex_1(fa, f) {
|
473
459
|
const result = [];
|
474
460
|
|
475
|
-
for (let i = 0; i <
|
461
|
+
for (let i = 0; i < tsplus_module_4.length(fa); i++) {
|
476
462
|
const maybeB = f(i, unsafeGet_1(fa, i));
|
477
463
|
|
478
|
-
if (
|
464
|
+
if (tsplus_module_5.isJust(maybeB)) {
|
479
465
|
result.push(maybeB.value);
|
480
466
|
}
|
481
467
|
}
|
@@ -498,19 +484,19 @@ export function find_(self, p) {
|
|
498
484
|
*/
|
499
485
|
|
500
486
|
export function findIndex_(as, predicate) {
|
501
|
-
return findMapWithIndex_1(as, (i, a) => predicate(a) ?
|
487
|
+
return findMapWithIndex_1(as, (i, a) => predicate(a) ? tsplus_module_10.just(i) : tsplus_module_10.nothing());
|
502
488
|
}
|
503
489
|
|
504
490
|
function findWithIndex_1(as, p) {
|
505
|
-
const len =
|
491
|
+
const len = tsplus_module_4.length(as);
|
506
492
|
|
507
493
|
for (let i = 0; i < len; i++) {
|
508
494
|
if (p(i, as._array[i])) {
|
509
|
-
return
|
495
|
+
return tsplus_module_10.just(as._array[i]);
|
510
496
|
}
|
511
497
|
}
|
512
498
|
|
513
|
-
return
|
499
|
+
return tsplus_module_10.nothing();
|
514
500
|
}
|
515
501
|
/**
|
516
502
|
* @tsplus fluent fncts.ImmutableArray findMap
|
@@ -525,36 +511,36 @@ export function findMap_(as, f) {
|
|
525
511
|
*/
|
526
512
|
|
527
513
|
function findMapWithIndex_1(as, f) {
|
528
|
-
const len =
|
514
|
+
const len = tsplus_module_4.length(as);
|
529
515
|
|
530
516
|
for (let i = 0; i < len; i++) {
|
531
517
|
const v = f(i, as._array[i]);
|
532
518
|
|
533
|
-
if (
|
519
|
+
if (tsplus_module_5.isJust(v)) {
|
534
520
|
return v;
|
535
521
|
}
|
536
522
|
}
|
537
523
|
|
538
|
-
return
|
524
|
+
return tsplus_module_10.nothing();
|
539
525
|
}
|
540
526
|
|
541
527
|
export function findLast_(as, p) {
|
542
|
-
const len =
|
528
|
+
const len = tsplus_module_4.length(as);
|
543
529
|
|
544
530
|
for (let i = len - 1; i >= 0; i--) {
|
545
531
|
if (p(as._array[i])) {
|
546
|
-
return
|
532
|
+
return tsplus_module_10.just(as._array[i]);
|
547
533
|
}
|
548
534
|
}
|
549
535
|
|
550
|
-
return
|
536
|
+
return tsplus_module_10.nothing();
|
551
537
|
}
|
552
538
|
/**
|
553
539
|
* @tsplus fluent fncts.ImmutableArray findLastIndex
|
554
540
|
*/
|
555
541
|
|
556
542
|
export function findLastIndex_(self, p) {
|
557
|
-
return findLastMapWithIndex_1(self, (i, a) => p(a) ?
|
543
|
+
return findLastMapWithIndex_1(self, (i, a) => p(a) ? tsplus_module_10.just(i) : tsplus_module_10.nothing());
|
558
544
|
}
|
559
545
|
/**
|
560
546
|
* @tsplus fluent fncts.ImmutableArray findLastMap
|
@@ -568,17 +554,17 @@ export function findLastMap_(as, f) {
|
|
568
554
|
*/
|
569
555
|
|
570
556
|
function findLastMapWithIndex_1(as, f) {
|
571
|
-
const len =
|
557
|
+
const len = tsplus_module_4.length(as);
|
572
558
|
|
573
559
|
for (let i = len - 1; i >= 0; i--) {
|
574
560
|
const v = f(i, as._array[i]);
|
575
561
|
|
576
|
-
if (
|
562
|
+
if (tsplus_module_5.isJust(v)) {
|
577
563
|
return v;
|
578
564
|
}
|
579
565
|
}
|
580
566
|
|
581
|
-
return
|
567
|
+
return tsplus_module_10.nothing();
|
582
568
|
}
|
583
569
|
/**
|
584
570
|
* @tsplus fluent fncts.ImmutableArray foldLeftWithIndex
|
@@ -587,7 +573,7 @@ function findLastMapWithIndex_1(as, f) {
|
|
587
573
|
|
588
574
|
|
589
575
|
function foldLeftWithIndex_1(self, b, f) {
|
590
|
-
const len =
|
576
|
+
const len = tsplus_module_4.length(self);
|
591
577
|
let r = b;
|
592
578
|
|
593
579
|
for (let i = 0; i < len; i++) {
|
@@ -623,70 +609,51 @@ function foldLeftWithIndexWhile_1(self, b, p, f) {
|
|
623
609
|
let out = b;
|
624
610
|
let cont = p(out);
|
625
611
|
|
626
|
-
for (let i = 0; cont && i <
|
612
|
+
for (let i = 0; cont && i < tsplus_module_4.length(self); i++) {
|
627
613
|
out = f(i, out, self._array[i]);
|
628
614
|
cont = p(out);
|
629
615
|
}
|
630
616
|
|
631
617
|
return out;
|
632
618
|
}
|
633
|
-
|
634
|
-
export function fold(M) {
|
635
|
-
return self => foldLeft_1(self, M.nat, M.combine_);
|
636
|
-
}
|
637
619
|
/**
|
638
620
|
* @tsplus fluent fncts.ImmutableArray fold
|
639
|
-
* @tsplus fluent fncts.base.MutableArray fold
|
640
|
-
*/
|
641
|
-
|
642
|
-
function foldSelf_1(self, M) {
|
643
|
-
return foldLeft_1(self, M.nat, M.combine_);
|
644
|
-
}
|
645
|
-
/**
|
646
|
-
* @constrained
|
647
621
|
*/
|
648
622
|
|
649
623
|
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
}
|
655
|
-
/**
|
656
|
-
* @tsplus getter fncts.ImmutableArray foldMapWithIndex
|
657
|
-
* @tsplus getter fncts.base.MutableArray foldMapWithIndex
|
658
|
-
*/
|
659
|
-
|
660
|
-
function foldMapWithIndexSelf_1(self) {
|
661
|
-
return M => f => foldMapWithIndex_(M)(self, f);
|
624
|
+
function fold_1(self,
|
625
|
+
/** @tsplus auto */
|
626
|
+
M) {
|
627
|
+
return foldLeft_1(self, M.nat, M.combine);
|
662
628
|
}
|
663
629
|
/**
|
664
|
-
* @
|
630
|
+
* @tsplus fluent fncts.ImmutableArray foldMapWithIndex
|
665
631
|
*/
|
666
632
|
|
667
633
|
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
634
|
+
function foldMapWithIndex_1(self, f,
|
635
|
+
/** @tsplus auto */
|
636
|
+
M) {
|
637
|
+
return foldLeftWithIndex_1(self, M.nat, (i, b, a) => M.combine(b, f(i, a)));
|
672
638
|
}
|
673
639
|
/**
|
674
|
-
* @tsplus
|
675
|
-
* @tsplus getter fncts.base.MutableArray foldMap
|
640
|
+
* @tsplus fluent fncts.ImmutableArray foldMap
|
676
641
|
*/
|
677
642
|
|
678
|
-
|
679
|
-
|
643
|
+
|
644
|
+
export function foldMap_(self, f,
|
645
|
+
/** @tsplus auto */
|
646
|
+
M) {
|
647
|
+
return foldMapWithIndex_1(self, (_, a) => f(a), M);
|
680
648
|
}
|
681
649
|
/**
|
682
650
|
* @tsplus fluent fncts.ImmutableArray foldRightWithIndex
|
683
|
-
* @tsplus fluent fncts.base.MutableArray foldRightWithIndex
|
684
651
|
*/
|
685
652
|
|
686
653
|
function foldRightWithIndex_1(self, b, f) {
|
687
654
|
let r = b;
|
688
655
|
|
689
|
-
for (let i =
|
656
|
+
for (let i = tsplus_module_4.length(self) - 1; i >= 0; i--) {
|
690
657
|
r = f(i, self._array[i], r);
|
691
658
|
}
|
692
659
|
|
@@ -694,7 +661,6 @@ function foldRightWithIndex_1(self, b, f) {
|
|
694
661
|
}
|
695
662
|
/**
|
696
663
|
* @tsplus fluent fncts.ImmutableArray foldRight
|
697
|
-
* @tsplus fluent fncts.base.MutableArray foldRight
|
698
664
|
*/
|
699
665
|
|
700
666
|
|
@@ -703,7 +669,6 @@ export function foldRight_(self, b, f) {
|
|
703
669
|
}
|
704
670
|
/**
|
705
671
|
* @tsplus fluent fncts.ImmutableArray foldRighWhile
|
706
|
-
* @tsplus fluent fncts.base.MutableArray foldRightWhile
|
707
672
|
*/
|
708
673
|
|
709
674
|
export function foldRightWhile_(self, b, p, f) {
|
@@ -711,14 +676,13 @@ export function foldRightWhile_(self, b, p, f) {
|
|
711
676
|
}
|
712
677
|
/**
|
713
678
|
* @tsplus fluent fncts.ImmutableArray foldRightWithIndexWhile
|
714
|
-
* @tsplus fluent fncts.base.MutableArray foldRightWithIndexWhile
|
715
679
|
*/
|
716
680
|
|
717
681
|
function foldRightWithIndexWhile_1(self, b, predicate, f) {
|
718
682
|
let out = b;
|
719
683
|
let cont = predicate(out);
|
720
684
|
|
721
|
-
for (let i =
|
685
|
+
for (let i = tsplus_module_4.length(self) - 1; cont && i >= 0; i--) {
|
722
686
|
out = f(i, self._array[i], out);
|
723
687
|
cont = predicate(out);
|
724
688
|
}
|
@@ -740,7 +704,7 @@ function forEach_1(self, f) {
|
|
740
704
|
|
741
705
|
|
742
706
|
function get_1(self, i) {
|
743
|
-
return isOutOfBound_1(self, i) ?
|
707
|
+
return isOutOfBound_1(self, i) ? tsplus_module_10.nothing() : tsplus_module_10.just(self._array[i]);
|
744
708
|
}
|
745
709
|
|
746
710
|
export function group(E) {
|
@@ -749,17 +713,17 @@ export function group(E) {
|
|
749
713
|
const out = [h];
|
750
714
|
let i = 1;
|
751
715
|
|
752
|
-
for (; i <
|
716
|
+
for (; i < tsplus_module_4.length(self); i++) {
|
753
717
|
const a = self._array[i];
|
754
718
|
|
755
|
-
if (E.
|
719
|
+
if (E.equals(a, h)) {
|
756
720
|
out.push(a);
|
757
721
|
} else {
|
758
722
|
break;
|
759
723
|
}
|
760
724
|
}
|
761
725
|
|
762
|
-
return [
|
726
|
+
return [tsplus_module_11.unsafeAsNonEmptyArray(out), tsplus_module_3.slice_(self, i)];
|
763
727
|
});
|
764
728
|
}
|
765
729
|
/**
|
@@ -776,7 +740,7 @@ export function chopSelf(self, E) {
|
|
776
740
|
export function groupBy_(self, f) {
|
777
741
|
const out = {};
|
778
742
|
|
779
|
-
for (let i = 0; i <
|
743
|
+
for (let i = 0; i < tsplus_module_4.length(self); i++) {
|
780
744
|
const a = self._array[i];
|
781
745
|
const k = f(a);
|
782
746
|
|
@@ -787,59 +751,49 @@ export function groupBy_(self, f) {
|
|
787
751
|
}
|
788
752
|
}
|
789
753
|
|
790
|
-
return
|
754
|
+
return tsplus_module_12.toRecord(tsplus_module_12.map_(tsplus_module_13.Dictionary.get(out), tsplus_module_11.from));
|
791
755
|
}
|
792
756
|
/**
|
793
757
|
* @tsplus getter fncts.ImmutableArray head
|
794
758
|
*/
|
795
759
|
|
796
760
|
export function head(self) {
|
797
|
-
return
|
761
|
+
return tsplus_module_4.isNonEmpty(self) ? tsplus_module_10.just(self._array[0]) : tsplus_module_10.nothing();
|
798
762
|
}
|
799
763
|
/**
|
800
764
|
* @tsplus getter fncts.ImmutableArray init
|
801
765
|
*/
|
802
766
|
|
803
767
|
export function init(self) {
|
804
|
-
const len =
|
805
|
-
return len === 0 ?
|
768
|
+
const len = tsplus_module_4.length(self);
|
769
|
+
return len === 0 ? tsplus_module_10.nothing() : tsplus_module_10.just(tsplus_module_3.slice_(self, 0, len - 1));
|
806
770
|
}
|
807
771
|
/**
|
808
772
|
* @tsplus fluent fncts.ImmutableArray insertAt
|
809
773
|
*/
|
810
774
|
|
811
775
|
export function insertAt_(self, i, a) {
|
812
|
-
return isOutOfBound_1(self, i) ?
|
813
|
-
}
|
814
|
-
export function intersection_(E) {
|
815
|
-
const elemE = elem_(E);
|
816
|
-
return (self, that) => filter_1(self, a => elemE(that, a));
|
776
|
+
return isOutOfBound_1(self, i) ? tsplus_module_10.nothing() : tsplus_module_10.just(unsafeInsertAt_1(self, i, a));
|
817
777
|
}
|
818
778
|
/**
|
819
|
-
* @tsplus
|
779
|
+
* @tsplus fluent fncts.ImmutableArray intersection
|
820
780
|
*/
|
821
781
|
|
822
|
-
export function
|
823
|
-
|
782
|
+
export function intersection_(self, that,
|
783
|
+
/** @tsplus auto */
|
784
|
+
E) {
|
785
|
+
return filter_1(self, a => elem_1(that, a, E));
|
824
786
|
}
|
825
787
|
export function intersperse_(self, a) {
|
826
|
-
const len =
|
827
|
-
return len === 0 ? self : prepend_1(prependAll_1(
|
788
|
+
const len = tsplus_module_4.length(self);
|
789
|
+
return len === 0 ? self : prepend_1(prependAll_1(tsplus_module_3.slice_(self, 1, len), a), unsafeGet_1(self, 0));
|
828
790
|
}
|
829
791
|
/**
|
830
792
|
* @tsplus fluent fncts.ImmutableArray isEmpty
|
831
793
|
*/
|
832
794
|
|
833
795
|
function isEmpty_1(self) {
|
834
|
-
return
|
835
|
-
}
|
836
|
-
/**
|
837
|
-
* @tsplus fluent fncts.ImmutableArray isNonEmpty
|
838
|
-
*/
|
839
|
-
|
840
|
-
|
841
|
-
function isNonEmpty_1(self) {
|
842
|
-
return length_1(self) > 0;
|
796
|
+
return tsplus_module_4.length(self) === 0;
|
843
797
|
}
|
844
798
|
/**
|
845
799
|
* @tsplus fluent fncts.ImmutableArray isOutOfBound
|
@@ -847,7 +801,7 @@ function isNonEmpty_1(self) {
|
|
847
801
|
|
848
802
|
|
849
803
|
function isOutOfBound_1(self, i) {
|
850
|
-
return i < 0 || i >=
|
804
|
+
return i < 0 || i >= tsplus_module_4.length(self);
|
851
805
|
}
|
852
806
|
/**
|
853
807
|
* @tsplus fluent fncts.ImmutableArray join
|
@@ -862,25 +816,25 @@ export function join(self, separator) {
|
|
862
816
|
*/
|
863
817
|
|
864
818
|
export function last(self) {
|
865
|
-
return get_1(self,
|
819
|
+
return get_1(self, tsplus_module_4.length(self) - 1);
|
866
820
|
}
|
867
821
|
/**
|
868
822
|
* @tsplus getter fncts.ImmutableArray length
|
869
823
|
*/
|
870
824
|
|
871
|
-
function
|
825
|
+
export function length(self) {
|
872
826
|
return self._array.length;
|
873
827
|
}
|
874
828
|
/**
|
875
829
|
* @tsplus getter fncts.ImmutableArray lefts
|
876
830
|
*/
|
877
831
|
|
878
|
-
|
879
832
|
export function lefts(self) {
|
880
833
|
const ls = [];
|
881
834
|
|
882
|
-
for (let i = 0; i <
|
835
|
+
for (let i = 0; i < tsplus_module_4.length(self); i++) {
|
883
836
|
const a = self._array[i];
|
837
|
+
void 0;
|
884
838
|
|
885
839
|
if (a._tag === "Left"
|
886
840
|
/* EitherTag.Left */
|
@@ -904,10 +858,10 @@ function map_1(self, f) {
|
|
904
858
|
|
905
859
|
|
906
860
|
export function mapAccum_(self, s, f) {
|
907
|
-
const bs = Array(
|
861
|
+
const bs = Array(tsplus_module_4.length(self));
|
908
862
|
let state = s;
|
909
863
|
|
910
|
-
for (let i = 0; i <
|
864
|
+
for (let i = 0; i < tsplus_module_4.length(self); i++) {
|
911
865
|
const result = f(state, self._array[i]);
|
912
866
|
bs[i] = result[0];
|
913
867
|
state = result[1];
|
@@ -935,7 +889,7 @@ function mapWithIndex_1(self, f) {
|
|
935
889
|
|
936
890
|
|
937
891
|
export function modifyAt_(self, i, f) {
|
938
|
-
return isOutOfBound_1(self, i) ?
|
892
|
+
return isOutOfBound_1(self, i) ? tsplus_module_10.nothing() : tsplus_module_10.just(unsafeModifyAt_1(self, i, f));
|
939
893
|
}
|
940
894
|
/**
|
941
895
|
* @tsplus fluent fncts.ImmutableArray mutate
|
@@ -952,14 +906,14 @@ function mutate_1(self, f) {
|
|
952
906
|
|
953
907
|
|
954
908
|
function mutableClone_1(self) {
|
955
|
-
return
|
909
|
+
return tsplus_module_3.slice_(self, 0)._array;
|
956
910
|
}
|
957
911
|
|
958
912
|
function partitionWithIndex_1(self, p) {
|
959
913
|
const left = [];
|
960
914
|
const right = [];
|
961
915
|
|
962
|
-
for (let i = 0; i <
|
916
|
+
for (let i = 0; i < tsplus_module_4.length(self); i++) {
|
963
917
|
const a = self._array[i];
|
964
918
|
|
965
919
|
if (p(i, a)) {
|
@@ -983,8 +937,9 @@ function partitionMapWithIndex_1(self, f) {
|
|
983
937
|
const left = [];
|
984
938
|
const right = [];
|
985
939
|
|
986
|
-
for (let i = 0; i <
|
940
|
+
for (let i = 0; i < tsplus_module_4.length(self); i++) {
|
987
941
|
const ea = f(i, self._array[i]);
|
942
|
+
void 0;
|
988
943
|
|
989
944
|
switch (ea._tag) {
|
990
945
|
case "Left"
|
@@ -1016,7 +971,7 @@ export function partitionMap_(self, f) {
|
|
1016
971
|
*/
|
1017
972
|
|
1018
973
|
function prepend_1(self, head) {
|
1019
|
-
const len =
|
974
|
+
const len = tsplus_module_4.length(self);
|
1020
975
|
const out = Array(len + 1);
|
1021
976
|
out[0] = head;
|
1022
977
|
|
@@ -1035,7 +990,7 @@ function prepend_1(self, head) {
|
|
1035
990
|
function prependAll_1(self, a) {
|
1036
991
|
const out = [];
|
1037
992
|
|
1038
|
-
for (let i = 0; i <
|
993
|
+
for (let i = 0; i < tsplus_module_4.length(self); i++) {
|
1039
994
|
out.push(a, self._array[i]);
|
1040
995
|
}
|
1041
996
|
|
@@ -1049,12 +1004,12 @@ function prependAll_1(self, a) {
|
|
1049
1004
|
export function reverse(self) {
|
1050
1005
|
if (isEmpty_1(self)) {
|
1051
1006
|
return self;
|
1052
|
-
} else if (
|
1007
|
+
} else if (tsplus_module_4.length(self) === 1) {
|
1053
1008
|
return tsplus_module_2.make(self._array[0]);
|
1054
1009
|
} else {
|
1055
|
-
const out = Array(
|
1010
|
+
const out = Array(tsplus_module_4.length(self));
|
1056
1011
|
|
1057
|
-
for (let j = 0, i =
|
1012
|
+
for (let j = 0, i = tsplus_module_4.length(self) - 1; i >= 0; i--, j++) {
|
1058
1013
|
out[j] = self._array[i];
|
1059
1014
|
}
|
1060
1015
|
|
@@ -1068,8 +1023,9 @@ export function reverse(self) {
|
|
1068
1023
|
export function rights(self) {
|
1069
1024
|
const rs = [];
|
1070
1025
|
|
1071
|
-
for (let i = 0; i <
|
1026
|
+
for (let i = 0; i < tsplus_module_4.length(self); i++) {
|
1072
1027
|
const a = self._array[i];
|
1028
|
+
void 0;
|
1073
1029
|
|
1074
1030
|
if (a._tag === "Right"
|
1075
1031
|
/* EitherTag.Right */
|
@@ -1085,14 +1041,14 @@ export function rights(self) {
|
|
1085
1041
|
*/
|
1086
1042
|
|
1087
1043
|
function rotate_1(self, n) {
|
1088
|
-
const len =
|
1044
|
+
const len = tsplus_module_4.length(self);
|
1089
1045
|
|
1090
1046
|
if (n === 0 || len <= 1 || len === Math.abs(n)) {
|
1091
1047
|
return self;
|
1092
1048
|
} else if (n < 0) {
|
1093
1049
|
return rotate_1(self, len + n);
|
1094
1050
|
} else {
|
1095
|
-
return concat_1(
|
1051
|
+
return concat_1(tsplus_module_3.slice_(self, -n), tsplus_module_3.slice_(self, 0, len - n));
|
1096
1052
|
}
|
1097
1053
|
}
|
1098
1054
|
/**
|
@@ -1101,7 +1057,7 @@ function rotate_1(self, n) {
|
|
1101
1057
|
|
1102
1058
|
|
1103
1059
|
export function scanLeft_(self, b, f) {
|
1104
|
-
const l =
|
1060
|
+
const l = tsplus_module_4.length(self);
|
1105
1061
|
const r = Array(l + 1);
|
1106
1062
|
r[0] = b;
|
1107
1063
|
|
@@ -1116,7 +1072,7 @@ export function scanLeft_(self, b, f) {
|
|
1116
1072
|
*/
|
1117
1073
|
|
1118
1074
|
export function scanRight_(self, b, f) {
|
1119
|
-
const l =
|
1075
|
+
const l = tsplus_module_4.length(self);
|
1120
1076
|
const r = Array(l + 1);
|
1121
1077
|
r[l] = b;
|
1122
1078
|
|
@@ -1130,8 +1086,10 @@ export function scanRight_(self, b, f) {
|
|
1130
1086
|
* @tsplus fluent fncts.ImmutableArray sort
|
1131
1087
|
*/
|
1132
1088
|
|
1133
|
-
function sort_1(self,
|
1134
|
-
|
1089
|
+
function sort_1(self,
|
1090
|
+
/** @tsplus auto */
|
1091
|
+
O) {
|
1092
|
+
return isEmpty_1(self) || tsplus_module_4.length(self) === 1 ? self : tsplus_module_2.asImmutableArray(self._array.slice().sort(O.compare));
|
1135
1093
|
}
|
1136
1094
|
/**
|
1137
1095
|
* @tsplus fluent fncts.ImmutableArray sortBy
|
@@ -1139,7 +1097,7 @@ function sort_1(self, O) {
|
|
1139
1097
|
|
1140
1098
|
|
1141
1099
|
export function sortBy(self, Os) {
|
1142
|
-
return sort_1(self,
|
1100
|
+
return sort_1(self, fold_1(Os, tsplus_module_14.getMonoid()));
|
1143
1101
|
}
|
1144
1102
|
export function spanLeft_(self, p) {
|
1145
1103
|
const i = spanIndexLeft_1(self, p);
|
@@ -1149,7 +1107,7 @@ export function spanLeft_(self, p) {
|
|
1149
1107
|
init[j] = self._array[j];
|
1150
1108
|
}
|
1151
1109
|
|
1152
|
-
const l =
|
1110
|
+
const l = tsplus_module_4.length(self);
|
1153
1111
|
const rest = Array(l - i);
|
1154
1112
|
|
1155
1113
|
for (let j = i; j < l; j++) {
|
@@ -1160,7 +1118,7 @@ export function spanLeft_(self, p) {
|
|
1160
1118
|
}
|
1161
1119
|
export function spanRight_(self, p) {
|
1162
1120
|
const i = spanIndexRight_1(self, p);
|
1163
|
-
const l =
|
1121
|
+
const l = tsplus_module_4.length(self);
|
1164
1122
|
const tail = Array(l - i - 1);
|
1165
1123
|
|
1166
1124
|
for (let j = l - 1; j > i; j--) {
|
@@ -1180,7 +1138,7 @@ export function spanRight_(self, p) {
|
|
1180
1138
|
*/
|
1181
1139
|
|
1182
1140
|
function spanIndexLeft_1(self, p) {
|
1183
|
-
const l =
|
1141
|
+
const l = tsplus_module_4.length(self);
|
1184
1142
|
let i = 0;
|
1185
1143
|
|
1186
1144
|
for (; i < l; i++) {
|
@@ -1197,7 +1155,7 @@ function spanIndexLeft_1(self, p) {
|
|
1197
1155
|
|
1198
1156
|
|
1199
1157
|
function spanIndexRight_1(as, predicate) {
|
1200
|
-
let i =
|
1158
|
+
let i = tsplus_module_4.length(as) - 1;
|
1201
1159
|
|
1202
1160
|
for (; i >= 0; i--) {
|
1203
1161
|
if (!predicate(as._array[i])) {
|
@@ -1207,67 +1165,27 @@ function spanIndexRight_1(as, predicate) {
|
|
1207
1165
|
|
1208
1166
|
return i;
|
1209
1167
|
}
|
1210
|
-
/**
|
1211
|
-
* @tsplus fluent fncts.ImmutableArray slice
|
1212
|
-
*/
|
1213
|
-
|
1214
|
-
|
1215
|
-
function slice_1(self, start, end) {
|
1216
|
-
return tsplus_module_2.asImmutableArray(self._array.slice(start, end));
|
1217
|
-
}
|
1218
|
-
/**
|
1219
|
-
* @tsplus fluent fncts.ImmutableArray splitAt
|
1220
|
-
*/
|
1221
|
-
|
1222
|
-
|
1223
|
-
function splitAt_1(as, n) {
|
1224
|
-
return [slice_1(as, 0, n), slice_1(as, n)];
|
1225
|
-
}
|
1226
|
-
/**
|
1227
|
-
* @tsplus fluent fncts.ImmutableArray splitWhere
|
1228
|
-
*/
|
1229
|
-
|
1230
|
-
|
1231
|
-
export function splitWhere_(self, p) {
|
1232
|
-
let cont = true;
|
1233
|
-
let i = 0;
|
1234
|
-
|
1235
|
-
while (cont && i < length_1(self)) {
|
1236
|
-
if (p(self._array[i])) {
|
1237
|
-
cont = false;
|
1238
|
-
} else {
|
1239
|
-
i++;
|
1240
|
-
}
|
1241
|
-
}
|
1242
|
-
|
1243
|
-
return splitAt_1(self, i);
|
1244
|
-
}
|
1245
|
-
export const sequence = A => self => traverseSelf_1(self)(A)(identity);
|
1246
|
-
/**
|
1247
|
-
* @tsplus getter fncts.ImmutableArray sequence
|
1248
|
-
*/
|
1249
|
-
|
1250
|
-
export const sequenceSelf = self => A => traverseSelf_1(self)(A)(identity);
|
1251
1168
|
/**
|
1252
1169
|
* @tsplus getter fncts.ImmutableArray tail
|
1253
1170
|
*/
|
1254
1171
|
|
1172
|
+
|
1255
1173
|
export function tail(self) {
|
1256
|
-
return
|
1174
|
+
return tsplus_module_4.isNonEmpty(self) ? tsplus_module_10.just(tsplus_module_3.slice_(self, 1)) : tsplus_module_10.nothing();
|
1257
1175
|
}
|
1258
1176
|
/**
|
1259
1177
|
* @tsplus fluent fncts.ImmutableArray take
|
1260
1178
|
*/
|
1261
1179
|
|
1262
1180
|
export function take_(self, n) {
|
1263
|
-
return
|
1181
|
+
return tsplus_module_3.slice_(self, 0, n);
|
1264
1182
|
}
|
1265
1183
|
/**
|
1266
1184
|
* @tsplus fluent fncts.ImmutableArray takeLast
|
1267
1185
|
*/
|
1268
1186
|
|
1269
1187
|
export function takeLast_(as, n) {
|
1270
|
-
return isEmpty_1(as) ? tsplus_module_2.empty() :
|
1188
|
+
return isEmpty_1(as) ? tsplus_module_2.empty() : tsplus_module_3.slice_(as, -n);
|
1271
1189
|
}
|
1272
1190
|
export function takeWhile_(self, p) {
|
1273
1191
|
const i = spanIndexLeft_1(self, p);
|
@@ -1279,70 +1197,59 @@ export function takeWhile_(self, p) {
|
|
1279
1197
|
|
1280
1198
|
return tsplus_module_2.asImmutableArray(init);
|
1281
1199
|
}
|
1282
|
-
export const traverseWithIndex_ = /*#__PURE__*/P.mkTraverseWithIndex_()(_ => A => (ta, f) => foldLeftWithIndex_1(ta, A.pure(tsplus_module_2.empty()), (i, fbs, a) => A.zipWith_(fbs, f(i, a), (bs, b) => append_1(bs, b))));
|
1283
1200
|
/**
|
1284
|
-
* @tsplus
|
1201
|
+
* @tsplus fluent fncts.ImmutableArray traverseWithIndex
|
1285
1202
|
*/
|
1286
1203
|
|
1287
|
-
|
1204
|
+
const traverseWithIndex_1 = (ta, f, G) => foldLeftWithIndex_1(ta, G.pure(tsplus_module_2.empty()), (i, fbs, a) => tsplus_module_15.zipWith(fbs, f(i, a), (bs, b) => append_1(bs, b), G));
|
1205
|
+
|
1206
|
+
export const traverseWithIndex_ = traverseWithIndex_1;
|
1288
1207
|
/**
|
1289
|
-
* @tsplus
|
1208
|
+
* @tsplus fluent fncts.ImmutableArray traverse
|
1290
1209
|
*/
|
1291
1210
|
|
1292
|
-
const
|
1211
|
+
const traverse_1 = (self, f, G) => traverseWithIndex_1(self, (_, a) => f(a), G);
|
1293
1212
|
|
1294
|
-
export const
|
1295
|
-
export const traverse_ = A => (self, f) => traverseWithIndexSelf_1(self)(A)((_, a) => f(a));
|
1213
|
+
export const traverse_ = traverse_1;
|
1296
1214
|
/**
|
1297
|
-
* @tsplus
|
1215
|
+
* @tsplus fluent fncts.ImmutableArray union
|
1298
1216
|
*/
|
1299
1217
|
|
1300
|
-
export
|
1218
|
+
export function union_(self, that,
|
1219
|
+
/** @tsplus auto */
|
1220
|
+
E) {
|
1221
|
+
return concat_1(self, filter_1(that, a => !elem_1(self, a, E)));
|
1222
|
+
}
|
1301
1223
|
/**
|
1302
|
-
* @tsplus
|
1224
|
+
* @tsplus fluent fncts.ImmutableArray uniq
|
1303
1225
|
*/
|
1304
1226
|
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
}
|
1312
|
-
export function uniq(E) {
|
1313
|
-
return self => {
|
1314
|
-
if (length_1(self) === 1) {
|
1315
|
-
return self;
|
1316
|
-
}
|
1227
|
+
export function uniq(self,
|
1228
|
+
/** @tsplus auto */
|
1229
|
+
E) {
|
1230
|
+
if (tsplus_module_4.length(self) === 1) {
|
1231
|
+
return self;
|
1232
|
+
}
|
1317
1233
|
|
1318
|
-
|
1319
|
-
|
1320
|
-
const len = length_1(self);
|
1234
|
+
const out = [];
|
1235
|
+
const len = tsplus_module_4.length(self);
|
1321
1236
|
|
1322
|
-
|
1323
|
-
|
1237
|
+
for (let i = 0; i < len; i++) {
|
1238
|
+
const a = self._array[i];
|
1324
1239
|
|
1325
|
-
|
1326
|
-
|
1327
|
-
}
|
1240
|
+
if (!elem_1(tsplus_module_2.asImmutableArray(out), a, E)) {
|
1241
|
+
out.push(a);
|
1328
1242
|
}
|
1243
|
+
}
|
1329
1244
|
|
1330
|
-
|
1331
|
-
};
|
1332
|
-
}
|
1333
|
-
/**
|
1334
|
-
* @tsplus fluent fncts.ImmutableArray uniq
|
1335
|
-
*/
|
1336
|
-
|
1337
|
-
export function uniqSelf(self, E) {
|
1338
|
-
return uniq(E)(self);
|
1245
|
+
return tsplus_module_2.asImmutableArray(out);
|
1339
1246
|
}
|
1340
1247
|
/**
|
1341
1248
|
* @tsplus getter fncts.ImmutableArray unprepend
|
1342
1249
|
*/
|
1343
1250
|
|
1344
1251
|
export function unprepend(self) {
|
1345
|
-
return
|
1252
|
+
return tsplus_module_4.isNonEmpty(self) ? tsplus_module_10.just([unsafeGet_1(self, 0), tsplus_module_3.slice_(self, 1)]) : tsplus_module_10.nothing();
|
1346
1253
|
}
|
1347
1254
|
/**
|
1348
1255
|
* @tsplus index fncts.ImmutableArray
|
@@ -1415,10 +1322,10 @@ function unsafeUpdateAt_1(as, i, a) {
|
|
1415
1322
|
|
1416
1323
|
|
1417
1324
|
export function unzip(self) {
|
1418
|
-
const fa = Array(
|
1419
|
-
const fb = Array(
|
1325
|
+
const fa = Array(tsplus_module_4.length(self));
|
1326
|
+
const fb = Array(tsplus_module_4.length(self));
|
1420
1327
|
|
1421
|
-
for (let i = 0; i <
|
1328
|
+
for (let i = 0; i < tsplus_module_4.length(self); i++) {
|
1422
1329
|
fa[i] = self._array[i][0];
|
1423
1330
|
fb[i] = self._array[i][1];
|
1424
1331
|
}
|
@@ -1430,70 +1337,66 @@ export function unzip(self) {
|
|
1430
1337
|
*/
|
1431
1338
|
|
1432
1339
|
export function updateAt_(as, i, a) {
|
1433
|
-
return isOutOfBound_1(as, i) ?
|
1340
|
+
return isOutOfBound_1(as, i) ? tsplus_module_10.nothing() : tsplus_module_10.just(unsafeUpdateAt_1(as, i, a));
|
1434
1341
|
}
|
1435
|
-
export const wilt_ = A => (self, f) => wiltWithIndexSelf_1(self)(A)((_, a) => f(a));
|
1436
|
-
/**
|
1437
|
-
* @tsplus pipeable fncts.ImmutableArray wilt_
|
1438
|
-
*/
|
1439
|
-
|
1440
|
-
export const wilt = A => f => self => wiltWithIndexSelf_1(self)(A)((_, a) => f(a));
|
1441
1342
|
/**
|
1442
1343
|
* @tsplus fluent fncts.ImmutableArray wilt
|
1443
1344
|
*/
|
1444
1345
|
|
1445
|
-
export
|
1446
|
-
|
1447
|
-
|
1448
|
-
return r
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
* @tsplus dataFirst wither_
|
1468
|
-
*/
|
1469
|
-
|
1470
|
-
export const wither = A => f => self => wither_(A)(self, f);
|
1346
|
+
export function wilt_(self, f,
|
1347
|
+
/** @tsplus auto */
|
1348
|
+
G) {
|
1349
|
+
return tsplus_module_17.map(foldLeft_1(self, G.pure([[], []]), (fbs, a) => tsplus_module_15.zipWith(f(a), fbs, (eb, r) => tsplus_module_16.match_(eb, b1 => {
|
1350
|
+
r[0].push(b1);
|
1351
|
+
return r;
|
1352
|
+
}, b2 => {
|
1353
|
+
r[1].push(b2);
|
1354
|
+
return r;
|
1355
|
+
}), G)), ([b1s, b2s]) => [tsplus_module_2.asImmutableArray(b1s), tsplus_module_2.asImmutableArray(b2s)], G);
|
1356
|
+
}
|
1357
|
+
export function wiltWithIndex_(self, f,
|
1358
|
+
/** @tsplus auto */
|
1359
|
+
G) {
|
1360
|
+
return tsplus_module_17.map(foldLeftWithIndex_1(self, G.pure([[], []]), (i, fbs, a) => tsplus_module_15.zipWith(f(i, a), fbs, (eb, r) => tsplus_module_16.match_(eb, b1 => {
|
1361
|
+
r[0].push(b1);
|
1362
|
+
return r;
|
1363
|
+
}, b2 => {
|
1364
|
+
r[1].push(b2);
|
1365
|
+
return r;
|
1366
|
+
}), G)), ([b1s, b2s]) => [tsplus_module_2.asImmutableArray(b1s), tsplus_module_2.asImmutableArray(b2s)], G);
|
1367
|
+
}
|
1471
1368
|
/**
|
1472
1369
|
* @tsplus fluent fncts.ImmutableArray wither
|
1473
1370
|
*/
|
1474
1371
|
|
1475
|
-
export
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
return
|
1482
|
-
}
|
1483
|
-
/**
|
1484
|
-
* @tsplus dataFirst witherWithIndex_
|
1485
|
-
*/
|
1486
|
-
|
1487
|
-
export const witherWithIndex = A => f => self => witherWithIndex_(A)(self, f);
|
1372
|
+
export function wither_(self, f,
|
1373
|
+
/** @tsplus auto */
|
1374
|
+
G) {
|
1375
|
+
const G_1 =
|
1376
|
+
/** @tsplus auto */
|
1377
|
+
G;
|
1378
|
+
return witherWithIndex_1(self, (_, a) => f(a), G_1);
|
1379
|
+
}
|
1488
1380
|
/**
|
1489
1381
|
* @tsplus fluent fncts.ImmutableArray witherWithIndex
|
1490
1382
|
*/
|
1491
1383
|
|
1492
|
-
|
1384
|
+
function witherWithIndex_1(self, f,
|
1385
|
+
/** @tsplus auto */
|
1386
|
+
G) {
|
1387
|
+
return tsplus_module_17.map(foldLeftWithIndex_1(self, G.pure([]), (i, b, a) => tsplus_module_15.zipWith(f(i, a), b, (maybeB, bs) => {
|
1388
|
+
if (tsplus_module_5.isJust(maybeB)) {
|
1389
|
+
bs.push(maybeB.value);
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
return bs;
|
1393
|
+
}, G)), bs => tsplus_module_2.asImmutableArray(bs), G);
|
1394
|
+
}
|
1493
1395
|
/**
|
1494
1396
|
* @tsplus fluent fncts.ImmutableArray zip
|
1495
1397
|
*/
|
1496
1398
|
|
1399
|
+
|
1497
1400
|
export function zip_(self, that) {
|
1498
1401
|
return zipWith_1(self, that, tuple);
|
1499
1402
|
}
|
@@ -1502,7 +1405,7 @@ export function zip_(self, that) {
|
|
1502
1405
|
*/
|
1503
1406
|
|
1504
1407
|
function zipWith_1(self, fb, f) {
|
1505
|
-
const len = Math.min(
|
1408
|
+
const len = Math.min(tsplus_module_4.length(self), tsplus_module_4.length(fb));
|
1506
1409
|
const fc = Array(len);
|
1507
1410
|
|
1508
1411
|
for (let i = 0; i < len; i++) {
|