@fncts/base 0.0.19 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- package/_cjs/collection/Iterable/api/traverseConc.cjs +8 -8
- package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -1
- package/_cjs/collection/Iterable/api.cjs +497 -444
- package/_cjs/collection/Iterable/api.cjs.map +1 -1
- package/_cjs/collection/Iterable/constructors.cjs +7 -7
- package/_cjs/collection/Iterable/constructors.cjs.map +1 -1
- package/_cjs/collection/compat/Array/api.cjs +16 -12
- package/_cjs/collection/compat/Array/api.cjs.map +1 -1
- package/_cjs/collection/compat/Array/derivations.cjs +41 -19
- package/_cjs/collection/compat/Array/derivations.cjs.map +1 -1
- package/_cjs/collection/compat/ArrayLike/api.cjs +1 -1
- package/_cjs/collection/compat/ArrayLike/api.cjs.map +1 -1
- package/_cjs/collection/compat/Record/instances.cjs +39 -3
- package/_cjs/collection/compat/Record/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/api/makeBy.cjs +1 -1
- package/_cjs/collection/immutable/Conc/api/makeBy.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/api.cjs +866 -765
- package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/definition.cjs +55 -53
- package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/derivations.cjs +13 -2
- package/_cjs/collection/immutable/Conc/derivations.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc.cjs.map +1 -1
- package/_cjs/collection/immutable/Dictionary/api.cjs +57 -44
- package/_cjs/collection/immutable/Dictionary/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/api.cjs +351 -258
- package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/definition.cjs +1 -1
- package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/internal.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet/api.cjs +230 -192
- package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet/definition.cjs +1 -1
- package/_cjs/collection/immutable/HashSet/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs +6 -4
- package/_cjs/collection/immutable/ImmutableArray/api/chunksOf.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs +6 -4
- package/_cjs/collection/immutable/ImmutableArray/api/slice.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs +6 -4
- package/_cjs/collection/immutable/ImmutableArray/api/splitAt.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs +15 -13
- package/_cjs/collection/immutable/ImmutableArray/api/splitWhere.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +943 -749
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/derivations.cjs +12 -1
- package/_cjs/collection/immutable/ImmutableArray/derivations.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs +33 -33
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +338 -273
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs +15 -4
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs +2 -2
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +12 -12
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/List/api/foldLeft.cjs +12 -10
- package/_cjs/collection/immutable/List/api/foldLeft.cjs.map +1 -1
- package/_cjs/collection/immutable/List/api.cjs +164 -141
- package/_cjs/collection/immutable/List/api.cjs.map +1 -1
- package/_cjs/collection/immutable/List.cjs.map +1 -1
- package/_cjs/collection/immutable/Queue/api.cjs +64 -48
- package/_cjs/collection/immutable/Queue/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Queue/definition.cjs +1 -1
- package/_cjs/collection/immutable/Queue/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/RoseTree/api.cjs +50 -36
- package/_cjs/collection/immutable/RoseTree/api.cjs.map +1 -1
- package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap/api.cjs +408 -368
- package/_cjs/collection/immutable/SortedMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/api.cjs +723 -608
- package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/definition.cjs +18 -16
- package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/internal.cjs +40 -39
- package/_cjs/collection/immutable/Vector/internal.cjs.map +1 -1
- package/_cjs/collection/mutable/HashMap.cjs +3 -5
- package/_cjs/collection/mutable/HashMap.cjs.map +1 -1
- package/_cjs/collection/mutable/HashSet.cjs.map +1 -1
- package/_cjs/collection/mutable/ListBuffer.cjs +2 -2
- package/_cjs/collection/mutable/ListBuffer.cjs.map +1 -1
- package/_cjs/collection/mutable/internal.cjs +0 -2
- package/_cjs/collection/mutable/internal.cjs.map +1 -1
- package/_cjs/collection/weak/IterableWeakMap.cjs +7 -7
- package/_cjs/collection/weak/IterableWeakMap.cjs.map +1 -1
- package/_cjs/collection/weak/IterableWeakSet.cjs +7 -7
- package/_cjs/collection/weak/IterableWeakSet.cjs.map +1 -1
- package/_cjs/control/Eval/api.cjs +55 -43
- package/_cjs/control/Eval/api.cjs.map +1 -1
- package/_cjs/control/Eval/instance.cjs +4 -4
- package/_cjs/control/Eval/instance.cjs.map +1 -1
- package/_cjs/control/Eval/run.cjs +1 -1
- package/_cjs/control/Eval/run.cjs.map +1 -1
- package/_cjs/control/Z/api.cjs +241 -172
- package/_cjs/control/Z/api.cjs.map +1 -1
- package/_cjs/control/Z/instances.cjs +3 -3
- package/_cjs/control/Z/instances.cjs.map +1 -1
- package/_cjs/control/Z/runtime.cjs +250 -241
- package/_cjs/control/Z/runtime.cjs.map +1 -1
- package/_cjs/data/Branded/definition.cjs.map +1 -1
- package/_cjs/data/Branded/derivations.cjs +3 -3
- package/_cjs/data/Branded/derivations.cjs.map +1 -1
- package/_cjs/data/CaseClass.cjs.map +1 -1
- package/_cjs/data/Cause/api/fold.cjs +20 -18
- package/_cjs/data/Cause/api/fold.cjs.map +1 -1
- package/_cjs/data/Cause/api/isEmpty.cjs +1 -1
- package/_cjs/data/Cause/api/isEmpty.cjs.map +1 -1
- package/_cjs/data/Cause/api/linearize.cjs +8 -8
- package/_cjs/data/Cause/api/linearize.cjs.map +1 -1
- package/_cjs/data/Cause/api/prettyPrint.cjs +1 -1
- package/_cjs/data/Cause/api/prettyPrint.cjs.map +1 -1
- package/_cjs/data/Cause/api.cjs +160 -140
- package/_cjs/data/Cause/api.cjs.map +1 -1
- package/_cjs/data/Cause/definition.cjs +18 -18
- package/_cjs/data/Cause/definition.cjs.map +1 -1
- package/_cjs/data/Cause.cjs.map +1 -1
- package/_cjs/data/Const/api.cjs +8 -6
- package/_cjs/data/Const/api.cjs.map +1 -1
- package/_cjs/data/Const/instances.cjs +4 -4
- package/_cjs/data/Const/instances.cjs.map +1 -1
- package/_cjs/data/Datum/api.cjs +219 -176
- package/_cjs/data/Datum/api.cjs.map +1 -1
- package/_cjs/data/Datum/definition.cjs.map +1 -1
- package/_cjs/data/DatumEither/api.cjs +165 -133
- package/_cjs/data/DatumEither/api.cjs.map +1 -1
- package/_cjs/data/DecodeError/definition.cjs +14 -14
- package/_cjs/data/DecodeError/definition.cjs.map +1 -1
- package/_cjs/data/Decoder/api.cjs +9 -7
- package/_cjs/data/Decoder/api.cjs.map +1 -1
- package/_cjs/data/Duration/api.cjs +18 -12
- package/_cjs/data/Duration/api.cjs.map +1 -1
- package/_cjs/data/Either/api/align.cjs +8 -3
- package/_cjs/data/Either/api/align.cjs.map +1 -1
- package/_cjs/data/Either/api/alignWith.cjs +14 -12
- package/_cjs/data/Either/api/alignWith.cjs.map +1 -1
- package/_cjs/data/Either/api.cjs +206 -169
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/constructors.cjs +11 -9
- package/_cjs/data/Either/constructors.cjs.map +1 -1
- package/_cjs/data/Either/destructors.cjs +16 -14
- package/_cjs/data/Either/destructors.cjs.map +1 -1
- package/_cjs/data/Either/instances.cjs +8 -8
- package/_cjs/data/Either/instances.cjs.map +1 -1
- package/_cjs/data/EitherT/api.cjs +8 -8
- package/_cjs/data/EitherT/api.cjs.map +1 -1
- package/_cjs/data/Encoder/api.cjs +134 -0
- package/_cjs/data/Encoder/api.cjs.map +1 -0
- package/_cjs/data/Encoder/definition.cjs +25 -0
- package/_cjs/data/Encoder/definition.cjs.map +1 -0
- package/_cjs/data/{Patch.cjs → Encoder.cjs} +3 -3
- package/_cjs/data/Encoder.cjs.map +1 -0
- package/_cjs/data/Environment/api.cjs +45 -33
- package/_cjs/data/Environment/api.cjs.map +1 -1
- package/_cjs/data/Environment/definition.cjs.map +1 -1
- package/_cjs/data/{Patch/api.cjs → EnvironmentPatch.cjs} +134 -38
- package/_cjs/data/EnvironmentPatch.cjs.map +1 -0
- package/_cjs/data/ExecutionStrategy.cjs +21 -29
- package/_cjs/data/ExecutionStrategy.cjs.map +1 -1
- package/_cjs/data/Exit/api.cjs +159 -127
- package/_cjs/data/Exit/api.cjs.map +1 -1
- package/_cjs/data/Exit/constructors.cjs +4 -4
- package/_cjs/data/Exit/constructors.cjs.map +1 -1
- package/_cjs/data/FiberId/api.cjs +23 -21
- package/_cjs/data/FiberId/api.cjs.map +1 -1
- package/_cjs/data/FiberId/constructors.cjs.map +1 -1
- package/_cjs/data/Identity/api.cjs +26 -18
- package/_cjs/data/Identity/api.cjs.map +1 -1
- package/_cjs/data/Identity/instances.cjs +3 -3
- package/_cjs/data/Identity/instances.cjs.map +1 -1
- package/_cjs/data/Interval.cjs +43 -33
- package/_cjs/data/Interval.cjs.map +1 -1
- package/_cjs/data/Intervals.cjs +35 -27
- package/_cjs/data/Intervals.cjs.map +1 -1
- package/_cjs/data/Maybe/api.cjs +160 -125
- package/_cjs/data/Maybe/api.cjs.map +1 -1
- package/_cjs/data/Maybe/constructors.cjs +2 -2
- package/_cjs/data/Maybe/constructors.cjs.map +1 -1
- package/_cjs/data/Maybe/definition.cjs.map +1 -1
- package/_cjs/data/Maybe/destructors.cjs +9 -7
- package/_cjs/data/Maybe/destructors.cjs.map +1 -1
- package/_cjs/data/Maybe/instances.cjs +11 -11
- package/_cjs/data/Maybe/instances.cjs.map +1 -1
- package/_cjs/data/Predicate/api.cjs +10 -8
- package/_cjs/data/Predicate/api.cjs.map +1 -1
- package/_cjs/data/Refinement/api.cjs +15 -9
- package/_cjs/data/Refinement/api.cjs.map +1 -1
- package/_cjs/data/Struct/api.cjs +62 -50
- package/_cjs/data/Struct/api.cjs.map +1 -1
- package/_cjs/data/Tag/constructors.cjs +3 -2
- package/_cjs/data/Tag/constructors.cjs.map +1 -1
- package/_cjs/data/Tag/definition.cjs +0 -3
- package/_cjs/data/Tag/definition.cjs.map +1 -1
- package/_cjs/data/These/api.cjs +188 -170
- package/_cjs/data/These/api.cjs.map +1 -1
- package/_cjs/data/These/constructors.cjs +1 -1
- package/_cjs/data/These/constructors.cjs.map +1 -1
- package/_cjs/data/These/destructors.cjs +39 -35
- package/_cjs/data/These/destructors.cjs.map +1 -1
- package/_cjs/data/These/instances.cjs +1 -1
- package/_cjs/data/These/instances.cjs.map +1 -1
- package/_cjs/data/Trace/api.cjs +7 -5
- package/_cjs/data/Trace/api.cjs.map +1 -1
- package/_cjs/data/Zipped.cjs.map +1 -1
- package/_cjs/data/function/api.cjs +6 -4
- package/_cjs/data/function/api.cjs.map +1 -1
- package/_cjs/data/function/pipe.cjs +9 -0
- package/_cjs/data/function/pipe.cjs.map +1 -1
- package/_cjs/data/string/api.cjs +53 -96
- package/_cjs/data/string/api.cjs.map +1 -1
- package/_cjs/global/api.cjs +4 -2
- package/_cjs/global/api.cjs.map +1 -1
- package/_cjs/internal/AtomicBoolean.cjs.map +1 -1
- package/_cjs/internal/AtomicNumber.cjs.map +1 -1
- package/_cjs/internal/AtomicReference.cjs.map +1 -1
- package/_cjs/internal/Stack.cjs +2 -2
- package/_cjs/internal/Stack.cjs.map +1 -1
- package/_cjs/optics/At/api.cjs +1 -1
- package/_cjs/optics/At/api.cjs.map +1 -1
- package/_cjs/optics/At/definition.cjs +2 -2
- package/_cjs/optics/At/definition.cjs.map +1 -1
- package/_cjs/optics/Fold/definition.cjs +3 -4
- package/_cjs/optics/Fold/definition.cjs.map +1 -1
- package/_cjs/optics/Getter/definition.cjs +2 -3
- package/_cjs/optics/Getter/definition.cjs.map +1 -1
- package/_cjs/optics/Index/api.cjs +4 -4
- package/_cjs/optics/Index/api.cjs.map +1 -1
- package/_cjs/optics/Index/definition.cjs +2 -2
- package/_cjs/optics/Index/definition.cjs.map +1 -1
- package/_cjs/optics/Iso/api.cjs +9 -7
- package/_cjs/optics/Iso/api.cjs.map +1 -1
- package/_cjs/optics/Iso/definition.cjs +12 -12
- package/_cjs/optics/Iso/definition.cjs.map +1 -1
- package/_cjs/optics/Lens/api.cjs +54 -44
- package/_cjs/optics/Lens/api.cjs.map +1 -1
- package/_cjs/optics/Lens/definition.cjs +10 -10
- package/_cjs/optics/Lens/definition.cjs.map +1 -1
- package/_cjs/optics/Optional/api/compose.cjs +9 -7
- package/_cjs/optics/Optional/api/compose.cjs.map +1 -1
- package/_cjs/optics/Optional/definition.cjs +12 -13
- package/_cjs/optics/Optional/definition.cjs.map +1 -1
- package/_cjs/optics/Optional.cjs.map +1 -1
- package/_cjs/optics/Prism/api/compose.cjs +9 -7
- package/_cjs/optics/Prism/api/compose.cjs.map +1 -1
- package/_cjs/optics/Prism/api/fromNullable.cjs +2 -2
- package/_cjs/optics/Prism/api/fromNullable.cjs.map +1 -1
- package/_cjs/optics/Prism/api/just.cjs +2 -2
- package/_cjs/optics/Prism/api/just.cjs.map +1 -1
- package/_cjs/optics/Prism/definition.cjs +9 -9
- package/_cjs/optics/Prism/definition.cjs.map +1 -1
- package/_cjs/optics/Prism.cjs.map +1 -1
- package/_cjs/optics/Setter/definition.cjs +8 -13
- package/_cjs/optics/Setter/definition.cjs.map +1 -1
- package/_cjs/optics/Traversal/api/compose.cjs +8 -6
- package/_cjs/optics/Traversal/api/compose.cjs.map +1 -1
- package/_cjs/optics/Traversal/api/fromTraversable.cjs +2 -2
- package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -1
- package/_cjs/optics/Traversal/definition.cjs +12 -12
- package/_cjs/optics/Traversal/definition.cjs.map +1 -1
- package/_cjs/optics/Traversal.cjs.map +1 -1
- package/_cjs/typeclass/Align.cjs.map +1 -1
- package/_cjs/typeclass/Alt.cjs.map +1 -1
- package/_cjs/typeclass/Applicative.cjs.map +1 -1
- package/_cjs/typeclass/ApplicativeExcept.cjs +5 -10
- package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
- package/_cjs/typeclass/Apply.cjs +8 -8
- package/_cjs/typeclass/Apply.cjs.map +1 -1
- package/_cjs/typeclass/Chain.cjs +4 -4
- package/_cjs/typeclass/Chain.cjs.map +1 -1
- package/_cjs/typeclass/Eq/definition.cjs.map +1 -1
- package/_cjs/typeclass/Eq/derivations.cjs.map +1 -1
- package/_cjs/typeclass/Equatable/api.cjs.map +1 -1
- package/_cjs/typeclass/Equatable/definition.cjs.map +1 -1
- package/_cjs/typeclass/Equatable/fast-equals.cjs.map +1 -1
- package/_cjs/typeclass/Filterable.cjs.map +1 -1
- package/_cjs/typeclass/FilterableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Foldable.cjs +1 -1
- package/_cjs/typeclass/Foldable.cjs.map +1 -1
- package/_cjs/typeclass/FoldableWithIndex.cjs +1 -1
- package/_cjs/typeclass/FoldableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Functor.cjs.map +1 -1
- package/_cjs/typeclass/FunctorWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Guard/api.cjs +18 -10
- package/_cjs/typeclass/Guard/api.cjs.map +1 -1
- package/_cjs/typeclass/Guard/definition.cjs.map +1 -1
- package/_cjs/typeclass/Guard/derivations.cjs.map +1 -1
- package/_cjs/typeclass/Has.cjs +7 -5
- package/_cjs/typeclass/Has.cjs.map +1 -1
- package/_cjs/typeclass/HashEq.cjs.map +1 -1
- package/_cjs/typeclass/Hashable/definition.cjs.map +1 -1
- package/_cjs/typeclass/Hashable/hash.cjs.map +1 -1
- package/_cjs/typeclass/MonadExcept.cjs +1 -1
- package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api/contramap.cjs +7 -5
- package/_cjs/typeclass/Ord/api/contramap.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api/max.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api/min.cjs.map +1 -1
- package/_cjs/typeclass/Ord/definition.cjs.map +1 -1
- package/_cjs/typeclass/Ord/instances.cjs.map +1 -1
- package/_cjs/typeclass/Ordering.cjs.map +1 -1
- package/_cjs/typeclass/Semialign.cjs +7 -7
- package/_cjs/typeclass/Semialign.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/api.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/definition.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/derivations.cjs.map +1 -1
- package/_cjs/typeclass/Semimonoidal.cjs.map +1 -1
- package/_cjs/typeclass/Showable/definition.cjs.map +1 -1
- package/_cjs/typeclass/Showable/show.cjs +107 -107
- package/_cjs/typeclass/Showable/show.cjs.map +1 -1
- package/_cjs/typeclass/Showable/styles.cjs.map +1 -1
- package/_cjs/typeclass/Showable/util.cjs +1 -1
- package/_cjs/typeclass/Showable/util.cjs.map +1 -1
- package/_cjs/typeclass/Traversable.cjs +1 -2
- package/_cjs/typeclass/Traversable.cjs.map +1 -1
- package/_cjs/typeclass/TraversableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Witherable.cjs +3 -1
- package/_cjs/typeclass/Witherable.cjs.map +1 -1
- package/_cjs/typeclass/WitherableWithIndex.cjs +3 -1
- package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
- package/_cjs/util/AnsiFormat.cjs +11 -11
- package/_cjs/util/AnsiFormat.cjs.map +1 -1
- package/_cjs/util/PCGRandom.cjs.map +1 -1
- package/_cjs/util/assert.cjs.map +1 -1
- package/_cjs/util/pattern.cjs.map +1 -1
- package/_cjs/util/predicates.cjs.map +1 -1
- package/_cjs/util/rand/Random.cjs.map +1 -1
- package/_cjs/util/rand/distribution/UniformArrayIntDistribution.cjs.map +1 -1
- package/_cjs/util/rand/distribution/UniformBigIntDistribution.cjs.map +1 -1
- package/_cjs/util/rand/distribution/UniformIntDistribution.cjs.map +1 -1
- package/_cjs/util/rand/distribution/internals/ArrayInt.cjs.map +1 -1
- package/_cjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.cjs.map +1 -1
- package/_cjs/util/rand/distribution/internals/UniformIntDistributionInternal.cjs.map +1 -1
- package/_cjs/util/rand/generator/MersenneTwister.cjs.map +1 -1
- package/_cjs/util/rand/generator/RandomGenerator.cjs.map +1 -1
- package/_cjs/util/rand.cjs.map +1 -1
- package/_mjs/collection/Iterable/api/traverseConc.mjs +5 -5
- package/_mjs/collection/Iterable/api/traverseConc.mjs.map +1 -1
- package/_mjs/collection/Iterable/api.mjs +465 -411
- package/_mjs/collection/Iterable/api.mjs.map +1 -1
- package/_mjs/collection/Iterable/constructors.mjs +5 -5
- package/_mjs/collection/Iterable/constructors.mjs.map +1 -1
- package/_mjs/collection/compat/Array/api.mjs +16 -12
- package/_mjs/collection/compat/Array/api.mjs.map +1 -1
- package/_mjs/collection/compat/Array/derivations.mjs +35 -19
- package/_mjs/collection/compat/Array/derivations.mjs.map +1 -1
- package/_mjs/collection/compat/ArrayLike/api.mjs +1 -1
- package/_mjs/collection/compat/ArrayLike/api.mjs.map +1 -1
- package/_mjs/collection/compat/Record/instances.mjs +34 -3
- package/_mjs/collection/compat/Record/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api/makeBy.mjs +1 -1
- package/_mjs/collection/immutable/Conc/api/makeBy.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api.mjs +795 -697
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/definition.mjs +53 -51
- package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/derivations.mjs +10 -2
- package/_mjs/collection/immutable/Conc/derivations.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc.mjs.map +1 -1
- package/_mjs/collection/immutable/Dictionary/api.mjs +47 -35
- package/_mjs/collection/immutable/Dictionary/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/api.mjs +295 -217
- package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/definition.mjs +1 -1
- package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/internal.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/api.mjs +206 -168
- package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/definition.mjs +1 -1
- package/_mjs/collection/immutable/HashSet/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api/chunksOf.mjs +5 -3
- package/_mjs/collection/immutable/ImmutableArray/api/chunksOf.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs +5 -3
- package/_mjs/collection/immutable/ImmutableArray/api/slice.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs +5 -3
- package/_mjs/collection/immutable/ImmutableArray/api/splitAt.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs +13 -11
- package/_mjs/collection/immutable/ImmutableArray/api/splitWhere.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +816 -629
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/derivations.mjs +9 -1
- package/_mjs/collection/immutable/ImmutableArray/derivations.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs +34 -34
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +301 -239
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs +12 -4
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs +2 -2
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +13 -13
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/List/api/foldLeft.mjs +11 -9
- package/_mjs/collection/immutable/List/api/foldLeft.mjs.map +1 -1
- package/_mjs/collection/immutable/List/api.mjs +157 -133
- package/_mjs/collection/immutable/List/api.mjs.map +1 -1
- package/_mjs/collection/immutable/List.mjs.map +1 -1
- package/_mjs/collection/immutable/Queue/api.mjs +55 -39
- package/_mjs/collection/immutable/Queue/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Queue/definition.mjs +1 -1
- package/_mjs/collection/immutable/Queue/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree/api.mjs +50 -36
- package/_mjs/collection/immutable/RoseTree/api.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/api.mjs +398 -358
- package/_mjs/collection/immutable/SortedMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/api.mjs +650 -538
- package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/definition.mjs +16 -14
- package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/internal.mjs +40 -39
- package/_mjs/collection/immutable/Vector/internal.mjs.map +1 -1
- package/_mjs/collection/mutable/HashMap.mjs +3 -5
- package/_mjs/collection/mutable/HashMap.mjs.map +1 -1
- package/_mjs/collection/mutable/HashSet.mjs.map +1 -1
- package/_mjs/collection/mutable/ListBuffer.mjs +2 -2
- package/_mjs/collection/mutable/ListBuffer.mjs.map +1 -1
- package/_mjs/collection/mutable/internal.mjs +0 -2
- package/_mjs/collection/mutable/internal.mjs.map +1 -1
- package/_mjs/collection/weak/IterableWeakMap.mjs +7 -7
- package/_mjs/collection/weak/IterableWeakMap.mjs.map +1 -1
- package/_mjs/collection/weak/IterableWeakSet.mjs +7 -7
- package/_mjs/collection/weak/IterableWeakSet.mjs.map +1 -1
- package/_mjs/control/Eval/api.mjs +40 -28
- package/_mjs/control/Eval/api.mjs.map +1 -1
- package/_mjs/control/Eval/instance.mjs +5 -5
- package/_mjs/control/Eval/instance.mjs.map +1 -1
- package/_mjs/control/Eval/run.mjs +1 -1
- package/_mjs/control/Eval/run.mjs.map +1 -1
- package/_mjs/control/Z/api.mjs +196 -128
- package/_mjs/control/Z/api.mjs.map +1 -1
- package/_mjs/control/Z/instances.mjs +4 -4
- package/_mjs/control/Z/instances.mjs.map +1 -1
- package/_mjs/control/Z/runtime.mjs +244 -234
- package/_mjs/control/Z/runtime.mjs.map +1 -1
- package/_mjs/data/Branded/definition.mjs.map +1 -1
- package/_mjs/data/Branded/derivations.mjs +3 -3
- package/_mjs/data/Branded/derivations.mjs.map +1 -1
- package/_mjs/data/CaseClass.mjs.map +1 -1
- package/_mjs/data/Cause/api/fold.mjs +19 -17
- package/_mjs/data/Cause/api/fold.mjs.map +1 -1
- package/_mjs/data/Cause/api/isEmpty.mjs +1 -1
- package/_mjs/data/Cause/api/isEmpty.mjs.map +1 -1
- package/_mjs/data/Cause/api/linearize.mjs +8 -8
- package/_mjs/data/Cause/api/linearize.mjs.map +1 -1
- package/_mjs/data/Cause/api/prettyPrint.mjs +1 -1
- package/_mjs/data/Cause/api/prettyPrint.mjs.map +1 -1
- package/_mjs/data/Cause/api.mjs +149 -129
- package/_mjs/data/Cause/api.mjs.map +1 -1
- package/_mjs/data/Cause/definition.mjs +18 -18
- package/_mjs/data/Cause/definition.mjs.map +1 -1
- package/_mjs/data/Cause.mjs.map +1 -1
- package/_mjs/data/Const/api.mjs +6 -4
- package/_mjs/data/Const/api.mjs.map +1 -1
- package/_mjs/data/Const/instances.mjs +4 -4
- package/_mjs/data/Const/instances.mjs.map +1 -1
- package/_mjs/data/Datum/api.mjs +220 -179
- package/_mjs/data/Datum/api.mjs.map +1 -1
- package/_mjs/data/Datum/definition.mjs.map +1 -1
- package/_mjs/data/DatumEither/api.mjs +163 -132
- package/_mjs/data/DatumEither/api.mjs.map +1 -1
- package/_mjs/data/DecodeError/definition.mjs +14 -14
- package/_mjs/data/DecodeError/definition.mjs.map +1 -1
- package/_mjs/data/Decoder/api.mjs +9 -7
- package/_mjs/data/Decoder/api.mjs.map +1 -1
- package/_mjs/data/Duration/api.mjs +16 -10
- package/_mjs/data/Duration/api.mjs.map +1 -1
- package/_mjs/data/Either/api/align.mjs +8 -2
- package/_mjs/data/Either/api/align.mjs.map +1 -1
- package/_mjs/data/Either/api/alignWith.mjs +13 -11
- package/_mjs/data/Either/api/alignWith.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +175 -136
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/constructors.mjs +7 -5
- package/_mjs/data/Either/constructors.mjs.map +1 -1
- package/_mjs/data/Either/destructors.mjs +15 -13
- package/_mjs/data/Either/destructors.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +9 -9
- package/_mjs/data/Either/instances.mjs.map +1 -1
- package/_mjs/data/EitherT/api.mjs +8 -8
- package/_mjs/data/EitherT/api.mjs.map +1 -1
- package/_mjs/data/Encoder/api.mjs +102 -0
- package/_mjs/data/Encoder/api.mjs.map +1 -0
- package/_mjs/data/Encoder/definition.mjs +15 -0
- package/_mjs/data/Encoder/definition.mjs.map +1 -0
- package/_mjs/data/Encoder.mjs +4 -0
- package/_mjs/data/Encoder.mjs.map +1 -0
- package/_mjs/data/Environment/api.mjs +45 -33
- package/_mjs/data/Environment/api.mjs.map +1 -1
- package/_mjs/data/Environment/definition.mjs.map +1 -1
- package/_mjs/data/EnvironmentPatch.mjs +188 -0
- package/_mjs/data/EnvironmentPatch.mjs.map +1 -0
- package/_mjs/data/ExecutionStrategy.mjs +19 -27
- package/_mjs/data/ExecutionStrategy.mjs.map +1 -1
- package/_mjs/data/Exit/api.mjs +140 -108
- package/_mjs/data/Exit/api.mjs.map +1 -1
- package/_mjs/data/Exit/constructors.mjs +3 -3
- package/_mjs/data/Exit/constructors.mjs.map +1 -1
- package/_mjs/data/FiberId/api.mjs +22 -20
- package/_mjs/data/FiberId/api.mjs.map +1 -1
- package/_mjs/data/FiberId/constructors.mjs.map +1 -1
- package/_mjs/data/Identity/api.mjs +21 -13
- package/_mjs/data/Identity/api.mjs.map +1 -1
- package/_mjs/data/Identity/instances.mjs +4 -4
- package/_mjs/data/Identity/instances.mjs.map +1 -1
- package/_mjs/data/Interval.mjs +38 -28
- package/_mjs/data/Interval.mjs.map +1 -1
- package/_mjs/data/Intervals.mjs +35 -27
- package/_mjs/data/Intervals.mjs.map +1 -1
- package/_mjs/data/Maybe/api.mjs +141 -106
- package/_mjs/data/Maybe/api.mjs.map +1 -1
- package/_mjs/data/Maybe/constructors.mjs +1 -1
- package/_mjs/data/Maybe/constructors.mjs.map +1 -1
- package/_mjs/data/Maybe/definition.mjs.map +1 -1
- package/_mjs/data/Maybe/destructors.mjs +8 -6
- package/_mjs/data/Maybe/destructors.mjs.map +1 -1
- package/_mjs/data/Maybe/instances.mjs +12 -12
- package/_mjs/data/Maybe/instances.mjs.map +1 -1
- package/_mjs/data/Predicate/api.mjs +10 -8
- package/_mjs/data/Predicate/api.mjs.map +1 -1
- package/_mjs/data/Refinement/api.mjs +15 -9
- package/_mjs/data/Refinement/api.mjs.map +1 -1
- package/_mjs/data/Struct/api.mjs +56 -44
- package/_mjs/data/Struct/api.mjs.map +1 -1
- package/_mjs/data/Tag/constructors.mjs +3 -2
- package/_mjs/data/Tag/constructors.mjs.map +1 -1
- package/_mjs/data/Tag/definition.mjs +0 -2
- package/_mjs/data/Tag/definition.mjs.map +1 -1
- package/_mjs/data/These/api.mjs +187 -169
- package/_mjs/data/These/api.mjs.map +1 -1
- package/_mjs/data/These/constructors.mjs +1 -1
- package/_mjs/data/These/constructors.mjs.map +1 -1
- package/_mjs/data/These/destructors.mjs +35 -31
- package/_mjs/data/These/destructors.mjs.map +1 -1
- package/_mjs/data/These/instances.mjs +1 -1
- package/_mjs/data/These/instances.mjs.map +1 -1
- package/_mjs/data/Trace/api.mjs +6 -4
- package/_mjs/data/Trace/api.mjs.map +1 -1
- package/_mjs/data/Zipped.mjs.map +1 -1
- package/_mjs/data/function/api.mjs +5 -3
- package/_mjs/data/function/api.mjs.map +1 -1
- package/_mjs/data/function/pipe.mjs +7 -0
- package/_mjs/data/function/pipe.mjs.map +1 -1
- package/_mjs/data/string/api.mjs +46 -66
- package/_mjs/data/string/api.mjs.map +1 -1
- package/_mjs/global/api.mjs +4 -2
- package/_mjs/global/api.mjs.map +1 -1
- package/_mjs/internal/AtomicBoolean.mjs.map +1 -1
- package/_mjs/internal/AtomicNumber.mjs.map +1 -1
- package/_mjs/internal/AtomicReference.mjs.map +1 -1
- package/_mjs/internal/Stack.mjs +1 -1
- package/_mjs/internal/Stack.mjs.map +1 -1
- package/_mjs/optics/At/api.mjs +1 -1
- package/_mjs/optics/At/api.mjs.map +1 -1
- package/_mjs/optics/At/definition.mjs +2 -2
- package/_mjs/optics/At/definition.mjs.map +1 -1
- package/_mjs/optics/Fold/definition.mjs +2 -3
- package/_mjs/optics/Fold/definition.mjs.map +1 -1
- package/_mjs/optics/Getter/definition.mjs +1 -2
- package/_mjs/optics/Getter/definition.mjs.map +1 -1
- package/_mjs/optics/Index/api.mjs +4 -4
- package/_mjs/optics/Index/api.mjs.map +1 -1
- package/_mjs/optics/Index/definition.mjs +1 -1
- package/_mjs/optics/Index/definition.mjs.map +1 -1
- package/_mjs/optics/Iso/api.mjs +8 -6
- package/_mjs/optics/Iso/api.mjs.map +1 -1
- package/_mjs/optics/Iso/definition.mjs +9 -9
- package/_mjs/optics/Iso/definition.mjs.map +1 -1
- package/_mjs/optics/Lens/api.mjs +49 -39
- package/_mjs/optics/Lens/api.mjs.map +1 -1
- package/_mjs/optics/Lens/definition.mjs +7 -7
- package/_mjs/optics/Lens/definition.mjs.map +1 -1
- package/_mjs/optics/Optional/api/compose.mjs +8 -6
- package/_mjs/optics/Optional/api/compose.mjs.map +1 -1
- package/_mjs/optics/Optional/definition.mjs +8 -10
- package/_mjs/optics/Optional/definition.mjs.map +1 -1
- package/_mjs/optics/Optional.mjs.map +1 -1
- package/_mjs/optics/Prism/api/compose.mjs +8 -6
- package/_mjs/optics/Prism/api/compose.mjs.map +1 -1
- package/_mjs/optics/Prism/api/fromNullable.mjs +2 -2
- package/_mjs/optics/Prism/api/fromNullable.mjs.map +1 -1
- package/_mjs/optics/Prism/api/just.mjs +2 -2
- package/_mjs/optics/Prism/api/just.mjs.map +1 -1
- package/_mjs/optics/Prism/definition.mjs +6 -6
- package/_mjs/optics/Prism/definition.mjs.map +1 -1
- package/_mjs/optics/Prism.mjs.map +1 -1
- package/_mjs/optics/Setter/definition.mjs +5 -10
- package/_mjs/optics/Setter/definition.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/compose.mjs +7 -5
- package/_mjs/optics/Traversal/api/compose.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/fromTraversable.mjs +2 -2
- package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
- package/_mjs/optics/Traversal/definition.mjs +9 -9
- package/_mjs/optics/Traversal/definition.mjs.map +1 -1
- package/_mjs/optics/Traversal.mjs.map +1 -1
- package/_mjs/typeclass/Align.mjs.map +1 -1
- package/_mjs/typeclass/Alt.mjs.map +1 -1
- package/_mjs/typeclass/Applicative.mjs.map +1 -1
- package/_mjs/typeclass/ApplicativeExcept.mjs +6 -10
- package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -1
- package/_mjs/typeclass/Apply.mjs +9 -9
- package/_mjs/typeclass/Apply.mjs.map +1 -1
- package/_mjs/typeclass/Chain.mjs +5 -5
- package/_mjs/typeclass/Chain.mjs.map +1 -1
- package/_mjs/typeclass/Eq/definition.mjs.map +1 -1
- package/_mjs/typeclass/Eq/derivations.mjs.map +1 -1
- package/_mjs/typeclass/Equatable/api.mjs.map +1 -1
- package/_mjs/typeclass/Equatable/definition.mjs.map +1 -1
- package/_mjs/typeclass/Equatable/fast-equals.mjs.map +1 -1
- package/_mjs/typeclass/Filterable.mjs.map +1 -1
- package/_mjs/typeclass/FilterableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Foldable.mjs +1 -1
- package/_mjs/typeclass/Foldable.mjs.map +1 -1
- package/_mjs/typeclass/FoldableWithIndex.mjs +1 -1
- package/_mjs/typeclass/FoldableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Functor.mjs.map +1 -1
- package/_mjs/typeclass/FunctorWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Guard/api.mjs +18 -10
- package/_mjs/typeclass/Guard/api.mjs.map +1 -1
- package/_mjs/typeclass/Guard/definition.mjs.map +1 -1
- package/_mjs/typeclass/Guard/derivations.mjs.map +1 -1
- package/_mjs/typeclass/Has.mjs +7 -5
- package/_mjs/typeclass/Has.mjs.map +1 -1
- package/_mjs/typeclass/HashEq.mjs.map +1 -1
- package/_mjs/typeclass/Hashable/definition.mjs.map +1 -1
- package/_mjs/typeclass/Hashable/hash.mjs.map +1 -1
- package/_mjs/typeclass/MonadExcept.mjs +1 -1
- package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
- package/_mjs/typeclass/Ord/api/contramap.mjs +7 -5
- package/_mjs/typeclass/Ord/api/contramap.mjs.map +1 -1
- package/_mjs/typeclass/Ord/api/max.mjs.map +1 -1
- package/_mjs/typeclass/Ord/api/min.mjs.map +1 -1
- package/_mjs/typeclass/Ord/definition.mjs.map +1 -1
- package/_mjs/typeclass/Ord/instances.mjs.map +1 -1
- package/_mjs/typeclass/Ordering.mjs.map +1 -1
- package/_mjs/typeclass/Semialign.mjs +7 -7
- package/_mjs/typeclass/Semialign.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/api.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/definition.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/derivations.mjs.map +1 -1
- package/_mjs/typeclass/Semimonoidal.mjs.map +1 -1
- package/_mjs/typeclass/Showable/definition.mjs.map +1 -1
- package/_mjs/typeclass/Showable/show.mjs +107 -107
- package/_mjs/typeclass/Showable/show.mjs.map +1 -1
- package/_mjs/typeclass/Showable/styles.mjs.map +1 -1
- package/_mjs/typeclass/Showable/util.mjs +1 -1
- package/_mjs/typeclass/Showable/util.mjs.map +1 -1
- package/_mjs/typeclass/Traversable.mjs +1 -2
- package/_mjs/typeclass/Traversable.mjs.map +1 -1
- package/_mjs/typeclass/TraversableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Witherable.mjs +2 -1
- package/_mjs/typeclass/Witherable.mjs.map +1 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs +2 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -1
- package/_mjs/util/AnsiFormat.mjs +11 -11
- package/_mjs/util/AnsiFormat.mjs.map +1 -1
- package/_mjs/util/PCGRandom.mjs.map +1 -1
- package/_mjs/util/assert.mjs.map +1 -1
- package/_mjs/util/pattern.mjs.map +1 -1
- package/_mjs/util/predicates.mjs.map +1 -1
- package/_mjs/util/rand/Random.mjs.map +1 -1
- package/_mjs/util/rand/distribution/UniformArrayIntDistribution.mjs.map +1 -1
- package/_mjs/util/rand/distribution/UniformBigIntDistribution.mjs.map +1 -1
- package/_mjs/util/rand/distribution/UniformIntDistribution.mjs.map +1 -1
- package/_mjs/util/rand/distribution/internals/ArrayInt.mjs.map +1 -1
- package/_mjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.mjs.map +1 -1
- package/_mjs/util/rand/distribution/internals/UniformIntDistributionInternal.mjs.map +1 -1
- package/_mjs/util/rand/generator/MersenneTwister.mjs.map +1 -1
- package/_mjs/util/rand/generator/RandomGenerator.mjs.map +1 -1
- package/_mjs/util/rand.mjs.map +1 -1
- package/_src/collection/Iterable/api/traverseConc.ts +3 -3
- package/_src/collection/Iterable/api.ts +445 -408
- package/_src/collection/Iterable/constructors.ts +1 -1
- package/_src/collection/compat/Array/api.ts +16 -13
- package/_src/collection/compat/Array/derivations.ts +27 -1
- package/_src/collection/compat/Record/instances.ts +51 -2
- package/_src/collection/immutable/Conc/api.ts +716 -607
- package/_src/collection/immutable/Conc/definition.ts +60 -68
- package/_src/collection/immutable/Conc/derivations.ts +13 -0
- package/_src/collection/immutable/Conc.ts +0 -1
- package/_src/collection/immutable/Dictionary/api.ts +44 -32
- package/_src/collection/immutable/HashMap/api.ts +338 -224
- package/_src/collection/immutable/HashMap/internal.ts +3 -7
- package/_src/collection/immutable/HashSet/api.ts +193 -158
- package/_src/collection/immutable/ImmutableArray/api/chunksOf.ts +5 -3
- package/_src/collection/immutable/ImmutableArray/api/slice.ts +5 -3
- package/_src/collection/immutable/ImmutableArray/api/splitAt.ts +5 -3
- package/_src/collection/immutable/ImmutableArray/api/splitWhere.ts +13 -14
- package/_src/collection/immutable/ImmutableArray/api.ts +870 -722
- package/_src/collection/immutable/ImmutableArray/derivations.ts +13 -0
- package/_src/collection/immutable/ImmutableArray/instances.ts +54 -73
- package/_src/collection/immutable/ImmutableArray.ts +0 -1
- package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +311 -273
- package/_src/collection/immutable/ImmutableNonEmptyArray/constructors.ts +19 -4
- package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +0 -1
- package/_src/collection/immutable/ImmutableNonEmptyArray/derivations.ts +13 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +22 -23
- package/_src/collection/immutable/List/api/foldLeft.ts +11 -9
- package/_src/collection/immutable/List/api.ts +147 -133
- package/_src/collection/immutable/List.ts +0 -1
- package/_src/collection/immutable/Queue/api.ts +53 -37
- package/_src/collection/immutable/Queue/definition.ts +0 -1
- package/_src/collection/immutable/RoseTree/api.ts +38 -32
- package/_src/collection/immutable/RoseTree/definition.ts +2 -0
- package/_src/collection/immutable/SortedMap/api.ts +364 -332
- package/_src/collection/immutable/Vector/api.ts +608 -482
- package/_src/collection/immutable/Vector/definition.ts +11 -12
- package/_src/collection/immutable/Vector/internal.ts +37 -38
- package/_src/collection/mutable/HashMap.ts +1 -4
- package/_src/collection/mutable/HashSet.ts +1 -2
- package/_src/collection/mutable/ListBuffer.ts +1 -1
- package/_src/collection/mutable/internal.ts +0 -2
- package/_src/collection/weak/IterableWeakMap.ts +11 -7
- package/_src/collection/weak/IterableWeakSet.ts +10 -5
- package/_src/control/Eval/api.ts +35 -19
- package/_src/control/Eval/instance.ts +5 -5
- package/_src/control/Z/api.ts +191 -208
- package/_src/control/Z/instances.ts +4 -5
- package/_src/control/Z/runtime.ts +190 -189
- package/_src/data/Branded/definition.ts +11 -12
- package/_src/data/Branded/derivations.ts +2 -2
- package/_src/data/CaseClass.ts +4 -1
- package/_src/data/Cause/api/fold.ts +13 -14
- package/_src/data/Cause/api.ts +125 -105
- package/_src/data/Cause.ts +0 -1
- package/_src/data/Const/api.ts +6 -4
- package/_src/data/Const/instances.ts +3 -3
- package/_src/data/Datum/api.ts +229 -197
- package/_src/data/Datum/definition.ts +2 -5
- package/_src/data/DatumEither/api.ts +208 -193
- package/_src/data/Decoder/api.ts +5 -3
- package/_src/data/Duration/api.ts +19 -15
- package/_src/data/Either/api/align.ts +7 -2
- package/_src/data/Either/api/alignWith.ts +13 -15
- package/_src/data/Either/api.ts +141 -119
- package/_src/data/Either/constructors.ts +12 -10
- package/_src/data/Either/destructors.ts +11 -9
- package/_src/data/Either/instances.ts +24 -20
- package/_src/data/EitherT/api.ts +43 -49
- package/_src/data/Encoder/api.ts +123 -0
- package/_src/data/Encoder/definition.ts +12 -0
- package/_src/data/Encoder.ts +4 -0
- package/_src/data/Environment/api.ts +52 -44
- package/_src/data/Environment/definition.ts +6 -0
- package/_src/data/EnvironmentPatch.ts +137 -0
- package/_src/data/ExecutionStrategy.ts +14 -24
- package/_src/data/Exit/api.ts +104 -73
- package/_src/data/Exit/constructors.ts +2 -2
- package/_src/data/FiberId/api.ts +19 -17
- package/_src/data/FiberId/constructors.ts +1 -2
- package/_src/data/Identity/api.ts +20 -12
- package/_src/data/Identity/instances.ts +4 -7
- package/_src/data/Interval.ts +39 -29
- package/_src/data/Intervals.ts +31 -23
- package/_src/data/Maybe/api.ts +112 -79
- package/_src/data/Maybe/constructors.ts +3 -3
- package/_src/data/Maybe/definition.ts +11 -1
- package/_src/data/Maybe/destructors.ts +6 -4
- package/_src/data/Maybe/instances.ts +10 -21
- package/_src/data/Predicate/api.ts +14 -8
- package/_src/data/Refinement/api.ts +19 -13
- package/_src/data/Struct/api.ts +75 -55
- package/_src/data/Tag/constructors.ts +1 -2
- package/_src/data/Tag/definition.ts +0 -1
- package/_src/data/These/api.ts +114 -114
- package/_src/data/These/destructors.ts +23 -24
- package/_src/data/Trace/api.ts +5 -3
- package/_src/data/Zipped.ts +3 -4
- package/_src/data/function/api.ts +6 -7
- package/_src/data/function/pipe.ts +9 -1
- package/_src/data/string/api.ts +40 -60
- package/_src/data.ts +2 -1
- package/_src/global/api.ts +7 -12
- package/_src/global.ts +8 -0
- package/_src/internal/AtomicBoolean.ts +0 -1
- package/_src/internal/AtomicNumber.ts +0 -7
- package/_src/internal/AtomicReference.ts +0 -4
- package/_src/internal/Stack.ts +1 -7
- package/_src/optics/At/definition.ts +5 -3
- package/_src/optics/Fold/definition.ts +3 -10
- package/_src/optics/Getter/definition.ts +1 -2
- package/_src/optics/Index/definition.ts +1 -1
- package/_src/optics/Iso/api.ts +8 -6
- package/_src/optics/Iso/definition.ts +3 -3
- package/_src/optics/Lens/api.ts +44 -42
- package/_src/optics/Lens/definition.ts +5 -5
- package/_src/optics/Optional/api/compose.ts +9 -9
- package/_src/optics/Optional/definition.ts +9 -16
- package/_src/optics/Optional.ts +0 -1
- package/_src/optics/Prism/api/compose.ts +9 -6
- package/_src/optics/Prism/definition.ts +3 -3
- package/_src/optics/Prism.ts +0 -1
- package/_src/optics/Setter/definition.ts +3 -23
- package/_src/optics/Traversal/api/compose.ts +7 -8
- package/_src/optics/Traversal/api/fromTraversable.ts +1 -1
- package/_src/optics/Traversal/definition.ts +10 -15
- package/_src/optics/Traversal.ts +0 -1
- package/_src/typeclass/Align.ts +0 -3
- package/_src/typeclass/Alt.ts +2 -1
- package/_src/typeclass/Applicative.ts +0 -1
- package/_src/typeclass/ApplicativeExcept.ts +15 -10
- package/_src/typeclass/Apply.ts +30 -33
- package/_src/typeclass/Chain.ts +9 -12
- package/_src/typeclass/Eq/definition.ts +0 -3
- package/_src/typeclass/Eq/derivations.ts +0 -2
- package/_src/typeclass/Equatable/api.ts +0 -2
- package/_src/typeclass/Equatable/definition.ts +0 -4
- package/_src/typeclass/Equatable/fast-equals.ts +11 -93
- package/_src/typeclass/Filterable.ts +19 -13
- package/_src/typeclass/FilterableWithIndex.ts +19 -13
- package/_src/typeclass/Foldable.ts +7 -10
- package/_src/typeclass/FoldableWithIndex.ts +7 -10
- package/_src/typeclass/Functor.ts +6 -4
- package/_src/typeclass/FunctorWithIndex.ts +3 -2
- package/_src/typeclass/Guard/api.ts +21 -16
- package/_src/typeclass/Guard/definition.ts +0 -3
- package/_src/typeclass/Guard/derivations.ts +5 -6
- package/_src/typeclass/Has.ts +6 -4
- package/_src/typeclass/HashEq.ts +0 -7
- package/_src/typeclass/Hashable/definition.ts +0 -4
- package/_src/typeclass/Hashable/hash.ts +0 -26
- package/_src/typeclass/MonadExcept.ts +1 -1
- package/_src/typeclass/Ord/api/contramap.ts +7 -6
- package/_src/typeclass/Ord/api/max.ts +0 -1
- package/_src/typeclass/Ord/api/min.ts +0 -1
- package/_src/typeclass/Ord/definition.ts +0 -4
- package/_src/typeclass/Ord/instances.ts +0 -2
- package/_src/typeclass/Ordering.ts +2 -0
- package/_src/typeclass/Semialign.ts +43 -32
- package/_src/typeclass/Semigroup/api.ts +0 -2
- package/_src/typeclass/Semigroup/definition.ts +0 -4
- package/_src/typeclass/Semigroup/derivations.ts +0 -2
- package/_src/typeclass/Semimonoidal.ts +3 -2
- package/_src/typeclass/Showable/definition.ts +0 -6
- package/_src/typeclass/Showable/show.ts +1 -57
- package/_src/typeclass/Showable/styles.ts +0 -8
- package/_src/typeclass/Showable/util.ts +22 -57
- package/_src/typeclass/Traversable.ts +13 -18
- package/_src/typeclass/TraversableWithIndex.ts +5 -7
- package/_src/typeclass/Witherable.ts +21 -13
- package/_src/typeclass/WitherableWithIndex.ts +26 -17
- package/_src/typeclass/builtin/Symbol.ts +0 -1
- package/_src/types/extractions.ts +12 -3
- package/_src/types/utility.ts +3 -5
- package/_src/util/AnsiFormat.ts +0 -25
- package/_src/util/PCGRandom.ts +4 -9
- package/_src/util/assert.ts +1 -2
- package/_src/util/pattern.ts +91 -12
- package/_src/util/predicates.ts +3 -1
- package/_src/util/rand/Random.ts +12 -16
- package/_src/util/rand/distribution/Distribution.ts +0 -1
- package/_src/util/rand/distribution/UniformArrayIntDistribution.ts +0 -3
- package/_src/util/rand/distribution/UniformBigIntDistribution.ts +0 -5
- package/_src/util/rand/distribution/UniformIntDistribution.ts +0 -7
- package/_src/util/rand/distribution/internals/ArrayInt.ts +3 -13
- package/_src/util/rand/distribution/internals/UniformArrayIntDistributionInternal.ts +0 -3
- package/_src/util/rand/distribution/internals/UniformIntDistributionInternal.ts +0 -4
- package/_src/util/rand/generator/MersenneTwister.ts +6 -29
- package/_src/util/rand/generator/RandomGenerator.ts +0 -3
- package/_src/util/rand.ts +0 -2
- package/collection/Iterable/api/traverseConc.d.ts +2 -2
- package/collection/Iterable/api.d.ts +64 -64
- package/collection/Iterable/constructors.d.ts +1 -1
- package/collection/compat/Array/api.d.ts +6 -6
- package/collection/compat/Array/derivations.d.ts +11 -0
- package/collection/compat/Record/instances.d.ts +30 -6
- package/collection/immutable/Conc/api.d.ts +108 -105
- package/collection/immutable/Conc/definition.d.ts +2 -2
- package/collection/immutable/Conc/derivations.d.ts +6 -0
- package/collection/immutable/Dictionary/api.d.ts +12 -12
- package/collection/immutable/HashMap/api.d.ts +76 -70
- package/collection/immutable/HashSet/api.d.ts +45 -41
- package/collection/immutable/ImmutableArray/api/chunksOf.d.ts +2 -2
- package/collection/immutable/ImmutableArray/api/slice.d.ts +2 -2
- package/collection/immutable/ImmutableArray/api/splitAt.d.ts +2 -2
- package/collection/immutable/ImmutableArray/api/splitWhere.d.ts +3 -3
- package/collection/immutable/ImmutableArray/api.d.ts +206 -206
- package/collection/immutable/ImmutableArray/derivations.d.ts +6 -0
- package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +64 -63
- package/collection/immutable/ImmutableNonEmptyArray/derivations.d.ts +6 -0
- package/collection/immutable/List/api/foldLeft.d.ts +2 -2
- package/collection/immutable/List/api.d.ts +24 -24
- package/collection/immutable/Queue/api.d.ts +16 -16
- package/collection/immutable/RoseTree/api.d.ts +14 -14
- package/collection/immutable/SortedMap/api.d.ts +41 -41
- package/collection/immutable/Vector/api.d.ts +121 -117
- package/collection/immutable/Vector/definition.d.ts +2 -2
- package/collection/immutable/Vector/internal.d.ts +2 -2
- package/collection/mutable/ListBuffer.d.ts +1 -1
- package/control/Eval/api.d.ts +12 -12
- package/control/Z/api.d.ts +68 -68
- package/control/Z/runtime.d.ts +10 -10
- package/data/Branded/derivations.d.ts +2 -2
- package/data/Cause/api/fold.d.ts +3 -3
- package/data/Cause/api.d.ts +20 -20
- package/data/Const/api.d.ts +3 -3
- package/data/Datum/api.d.ts +43 -41
- package/data/DatumEither/api.d.ts +48 -46
- package/data/Decoder/api.d.ts +2 -2
- package/data/Duration/api.d.ts +7 -7
- package/data/Either/api/align.d.ts +5 -1
- package/data/Either/api/alignWith.d.ts +2 -2
- package/data/Either/api.d.ts +40 -46
- package/data/Either/constructors.d.ts +6 -6
- package/data/Either/destructors.d.ts +2 -2
- package/data/EitherT/api.d.ts +6 -6
- package/data/Encoder/api.d.ts +73 -0
- package/data/Encoder/definition.d.ts +12 -0
- package/data/Encoder.d.ts +2 -0
- package/data/Environment/api.d.ts +14 -14
- package/data/Environment/definition.d.ts +4 -0
- package/data/EnvironmentPatch.d.ts +73 -0
- package/data/ExecutionStrategy.d.ts +1 -6
- package/data/Exit/api.d.ts +32 -32
- package/data/Exit/constructors.d.ts +2 -2
- package/data/FiberId/api.d.ts +2 -2
- package/data/Identity/api.d.ts +8 -8
- package/data/Interval.d.ts +11 -11
- package/data/Intervals.d.ts +11 -11
- package/data/Maybe/api.d.ts +36 -37
- package/data/Maybe/constructors.d.ts +2 -2
- package/data/Maybe/definition.d.ts +7 -3
- package/data/Maybe/destructors.d.ts +2 -2
- package/data/Predicate/api.d.ts +5 -5
- package/data/Refinement/api.d.ts +9 -9
- package/data/Struct/api.d.ts +13 -23
- package/data/Tag/constructors.d.ts +1 -2
- package/data/Tag/definition.d.ts +0 -1
- package/data/These/api.d.ts +18 -22
- package/data/These/destructors.d.ts +4 -4
- package/data/Trace/api.d.ts +2 -2
- package/data/function/api.d.ts +3 -3
- package/data/function/pipe.d.ts +7 -1
- package/data/string/api.d.ts +9 -49
- package/data.d.ts +2 -1
- package/global/api.d.ts +3 -3
- package/global.d.ts +8 -0
- package/internal/Stack.d.ts +1 -1
- package/optics/At/definition.d.ts +1 -1
- package/optics/Fold/definition.d.ts +2 -6
- package/optics/Getter/definition.d.ts +1 -1
- package/optics/Index/definition.d.ts +1 -1
- package/optics/Iso/api.d.ts +2 -2
- package/optics/Iso/definition.d.ts +2 -2
- package/optics/Lens/api.d.ts +10 -10
- package/optics/Lens/definition.d.ts +4 -4
- package/optics/Optional/api/compose.d.ts +2 -2
- package/optics/Optional/definition.d.ts +4 -8
- package/optics/Prism/api/compose.d.ts +2 -2
- package/optics/Prism/definition.d.ts +2 -2
- package/optics/Setter/definition.d.ts +2 -14
- package/optics/Traversal/api/compose.d.ts +2 -2
- package/optics/Traversal/definition.d.ts +4 -4
- package/package.json +1 -1
- package/typeclass/Alt.d.ts +1 -1
- package/typeclass/ApplicativeExcept.d.ts +2 -6
- package/typeclass/Apply.d.ts +5 -5
- package/typeclass/Chain.d.ts +4 -4
- package/typeclass/Filterable.d.ts +6 -6
- package/typeclass/FilterableWithIndex.d.ts +6 -6
- package/typeclass/Foldable.d.ts +4 -4
- package/typeclass/FoldableWithIndex.d.ts +4 -4
- package/typeclass/Functor.d.ts +2 -2
- package/typeclass/FunctorWithIndex.d.ts +1 -1
- package/typeclass/Guard/api.d.ts +7 -7
- package/typeclass/Has.d.ts +3 -3
- package/typeclass/Ord/api/contramap.d.ts +2 -2
- package/typeclass/Semialign.d.ts +14 -14
- package/typeclass/Semimonoidal.d.ts +1 -1
- package/typeclass/Traversable.d.ts +4 -6
- package/typeclass/TraversableWithIndex.d.ts +2 -2
- package/typeclass/Witherable.d.ts +3 -3
- package/typeclass/WitherableWithIndex.d.ts +5 -5
- package/types/extractions.d.ts +10 -6
- package/util/assert.d.ts +1 -1
- package/_cjs/data/Patch/api.cjs.map +0 -1
- package/_cjs/data/Patch/definition.cjs +0 -88
- package/_cjs/data/Patch/definition.cjs.map +0 -1
- package/_cjs/data/Patch.cjs.map +0 -1
- package/_mjs/data/Patch/api.mjs +0 -112
- package/_mjs/data/Patch/api.mjs.map +0 -1
- package/_mjs/data/Patch/definition.mjs +0 -61
- package/_mjs/data/Patch/definition.mjs.map +0 -1
- package/_mjs/data/Patch.mjs +0 -4
- package/_mjs/data/Patch.mjs.map +0 -1
- package/_src/data/Patch/api.ts +0 -75
- package/_src/data/Patch/definition.ts +0 -58
- package/_src/data/Patch.ts +0 -4
- package/data/Patch/api.d.ts +0 -24
- package/data/Patch/definition.d.ts +0 -44
- package/data/Patch.d.ts +0 -2
@@ -13,145 +13,162 @@ import * as tsplus_module_12 from "@fncts/base/collection/immutable/ImmutableNon
|
|
13
13
|
import * as tsplus_module_13 from "@fncts/base/collection/immutable/Dictionary/definition";
|
14
14
|
import * as tsplus_module_14 from "@fncts/base/collection/immutable/Dictionary/api";
|
15
15
|
import * as tsplus_module_15 from "@fncts/base/typeclass/Ord/instances";
|
16
|
-
import * as tsplus_module_16 from "@fncts/base/
|
17
|
-
|
18
|
-
|
19
|
-
export const
|
20
|
-
export const
|
21
|
-
export const
|
22
|
-
export const flatMapWithIndex_ = flatMapWithIndex_1;
|
23
|
-
export const flatMap_ = flatMap_1;
|
16
|
+
import * as tsplus_module_16 from "@fncts/base/data/Either/destructors";
|
17
|
+
export const alignWith = alignWith_1;
|
18
|
+
export const append = append_1;
|
19
|
+
export const crossWith = crossWith_1;
|
20
|
+
export const flatMapWithIndex = flatMapWithIndex_1;
|
21
|
+
export const flatMap = flatMap_1;
|
24
22
|
export const flatten = flatten_1;
|
25
|
-
export const
|
26
|
-
export const
|
27
|
-
export const
|
28
|
-
export const
|
29
|
-
export const
|
30
|
-
export const
|
31
|
-
export const
|
32
|
-
export const
|
33
|
-
export const
|
34
|
-
export const
|
35
|
-
export const
|
36
|
-
export const
|
23
|
+
export const chop = chop_1;
|
24
|
+
export const concat = concat_1;
|
25
|
+
export const elem = elem_1;
|
26
|
+
export const everyWithIndex = everyWithIndex_1;
|
27
|
+
export const filter = filter_1;
|
28
|
+
export const filterWithIndex = filterWithIndex_1;
|
29
|
+
export const filterMapWithIndex = filterMapWithIndex_1;
|
30
|
+
export const findWithIndex = findWithIndex_1;
|
31
|
+
export const findMapWithIndex = findMapWithIndex_1;
|
32
|
+
export const findLastMapWithIndex = findLastMapWithIndex_1;
|
33
|
+
export const foldLeftWithIndex = foldLeftWithIndex_1;
|
34
|
+
export const foldLeft = foldLeft_1;
|
35
|
+
export const foldLeftWithIndexWhile = foldLeftWithIndexWhile_1;
|
37
36
|
export const fold = fold_1;
|
38
|
-
export const
|
39
|
-
export const
|
40
|
-
export const
|
41
|
-
export const
|
42
|
-
export const
|
37
|
+
export const foldMapWithIndex = foldMapWithIndex_1;
|
38
|
+
export const foldRightWithIndex = foldRightWithIndex_1;
|
39
|
+
export const foldRightWithIndexWhile = foldRightWithIndexWhile_1;
|
40
|
+
export const forEach = forEach_1;
|
41
|
+
export const get = get_1;
|
43
42
|
export const isEmpty = isEmpty_1;
|
44
|
-
export const
|
45
|
-
export const
|
46
|
-
export const
|
47
|
-
export const
|
43
|
+
export const isOutOfBound = isOutOfBound_1;
|
44
|
+
export const map = map_1;
|
45
|
+
export const mapWithIndex = mapWithIndex_1;
|
46
|
+
export const mutate = mutate_1;
|
48
47
|
export const mutableClone = mutableClone_1;
|
49
|
-
export const
|
50
|
-
export const
|
51
|
-
export const
|
52
|
-
export const
|
53
|
-
export const
|
48
|
+
export const partitionWithIndex = partitionWithIndex_1;
|
49
|
+
export const partitionMapWithIndex = partitionMapWithIndex_1;
|
50
|
+
export const prepend = prepend_1;
|
51
|
+
export const prependAll = prependAll_1;
|
52
|
+
export const rotate = rotate_1;
|
54
53
|
export const sort = sort_1;
|
55
|
-
export const
|
56
|
-
export const
|
54
|
+
export const spanIndexLeft = spanIndexLeft_1;
|
55
|
+
export const spanIndexRight = spanIndexRight_1;
|
56
|
+
export const _traverseWithIndex = _traverseWithIndex_1;
|
57
|
+
export const _traverse = _traverse_1;
|
57
58
|
export const unsafeGet = unsafeGet_1;
|
58
59
|
export const unsafeAsMutable = unsafeAsMutable_1;
|
59
|
-
export const
|
60
|
-
export const
|
61
|
-
export const
|
62
|
-
export const
|
63
|
-
export const
|
64
|
-
|
60
|
+
export const unsafeDeleteAt = unsafeDeleteAt_1;
|
61
|
+
export const unsafeInsertAt = unsafeInsertAt_1;
|
62
|
+
export const unsafeModifyAt = unsafeModifyAt_1;
|
63
|
+
export const unsafeUpdateAt = unsafeUpdateAt_1;
|
64
|
+
export const _wiltWithIndex = _wiltWithIndex_1;
|
65
|
+
export const _witherWithIndex = _witherWithIndex_1;
|
66
|
+
export const zipWith = zipWith_1;
|
67
|
+
import { identity, pipe, tuple } from "@fncts/base/data/function";
|
65
68
|
import * as P from "@fncts/base/typeclass";
|
66
69
|
/**
|
67
|
-
* @tsplus
|
70
|
+
* @tsplus pipeable fncts.ImmutableArray alignWith
|
68
71
|
*/
|
69
72
|
|
70
|
-
function alignWith_1(
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
function alignWith_1(fb, f) {
|
74
|
+
return self => {
|
75
|
+
const selfArray = self._array;
|
76
|
+
const thatArray = fb._array;
|
77
|
+
const minlen = Math.min(selfArray.length, thatArray.length);
|
78
|
+
const maxlen = Math.max(selfArray.length, thatArray.length);
|
79
|
+
const ret = Array(maxlen);
|
76
80
|
|
77
|
-
|
78
|
-
|
79
|
-
}
|
80
|
-
|
81
|
-
if (minlen === maxlen) {
|
82
|
-
return tsplus_module_2.asImmutableArray(ret);
|
83
|
-
} else if (selfArray.length > thatArray.length) {
|
84
|
-
for (let i = minlen; i < maxlen; i++) {
|
85
|
-
ret[i] = f(tsplus_module_1.left(selfArray[i]));
|
81
|
+
for (let i = 0; i < minlen; i++) {
|
82
|
+
ret[i] = f(tsplus_module_1.both(selfArray[i], thatArray[i]));
|
86
83
|
}
|
87
|
-
|
88
|
-
|
89
|
-
|
84
|
+
|
85
|
+
if (minlen === maxlen) {
|
86
|
+
return tsplus_module_2.asImmutableArray(ret);
|
87
|
+
} else if (selfArray.length > thatArray.length) {
|
88
|
+
for (let i = minlen; i < maxlen; i++) {
|
89
|
+
ret[i] = f(tsplus_module_1.left(selfArray[i]));
|
90
|
+
}
|
91
|
+
} else {
|
92
|
+
for (let i = minlen; i < maxlen; i++) {
|
93
|
+
ret[i] = f(tsplus_module_1.right(thatArray[i]));
|
94
|
+
}
|
90
95
|
}
|
91
|
-
}
|
92
96
|
|
93
|
-
|
97
|
+
return tsplus_module_2.asImmutableArray(ret);
|
98
|
+
};
|
94
99
|
}
|
95
100
|
/**
|
96
|
-
* @tsplus
|
101
|
+
* @tsplus pipeable fncts.ImmutableArray align
|
97
102
|
*/
|
98
103
|
|
99
104
|
|
100
|
-
export function
|
101
|
-
return
|
105
|
+
export function align(fb) {
|
106
|
+
return self => {
|
107
|
+
return alignWith_1(fb, identity)(self);
|
108
|
+
};
|
102
109
|
}
|
103
110
|
/**
|
104
|
-
* @tsplus
|
111
|
+
* @tsplus pipeable fncts.ImmutableArray alt
|
105
112
|
*/
|
106
113
|
|
107
|
-
export function
|
108
|
-
return
|
114
|
+
export function alt(that) {
|
115
|
+
return self => {
|
116
|
+
return concat_1(that())(self);
|
117
|
+
};
|
109
118
|
}
|
110
119
|
/**
|
111
|
-
* @tsplus
|
120
|
+
* @tsplus pipeable fncts.ImmutableArray ap
|
112
121
|
*/
|
113
122
|
|
114
|
-
export function
|
115
|
-
return
|
123
|
+
export function ap(fa) {
|
124
|
+
return self => {
|
125
|
+
return flatMap_1(f => map_1(f)(fa))(self);
|
126
|
+
};
|
116
127
|
}
|
117
128
|
/**
|
118
|
-
* @tsplus
|
129
|
+
* @tsplus pipeable fncts.ImmutableArray append
|
119
130
|
*/
|
120
131
|
|
121
|
-
function append_1(
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
132
|
+
function append_1(last) {
|
133
|
+
return self => {
|
134
|
+
const selfArray = self._array;
|
135
|
+
const len = selfArray.length;
|
136
|
+
const r = Array(len + 1);
|
137
|
+
r[len] = last;
|
126
138
|
|
127
|
-
|
128
|
-
|
129
|
-
|
139
|
+
for (let i = 0; i < len; i++) {
|
140
|
+
r[i] = selfArray[i];
|
141
|
+
}
|
130
142
|
|
131
|
-
|
143
|
+
return tsplus_module_2.asImmutableArray(r);
|
144
|
+
};
|
132
145
|
}
|
133
146
|
/**
|
134
|
-
* @tsplus
|
147
|
+
* @tsplus pipeable fncts.ImmutableArray crossWith
|
135
148
|
*/
|
136
149
|
|
137
150
|
|
138
|
-
function crossWith_1(
|
139
|
-
return
|
151
|
+
function crossWith_1(fb, f) {
|
152
|
+
return self => {
|
153
|
+
return flatMap_1(a => map_1(b => f(a, b))(fb))(self);
|
154
|
+
};
|
140
155
|
}
|
141
156
|
/**
|
142
|
-
* @tsplus
|
157
|
+
* @tsplus pipeable fncts.ImmutableArray cross
|
143
158
|
*/
|
144
159
|
|
145
160
|
|
146
|
-
export function
|
147
|
-
return
|
161
|
+
export function cross(fb) {
|
162
|
+
return self => {
|
163
|
+
return crossWith_1(fb, (a, b) => tsplus_module_3.make(a, b))(self);
|
164
|
+
};
|
148
165
|
}
|
149
166
|
/**
|
150
167
|
* @tsplus static fncts.ImmutableArrayOps chainRecDepthFirst
|
151
168
|
*/
|
152
169
|
|
153
170
|
export function chainRecDepthFirst(a, f) {
|
154
|
-
const buffer = unsafeAsMutable_1(tsplus_module_4.
|
171
|
+
const buffer = unsafeAsMutable_1(tsplus_module_4.slice()(f(a)));
|
155
172
|
const out = [];
|
156
173
|
|
157
174
|
while (buffer.length > 0) {
|
@@ -182,7 +199,7 @@ export function chainRecBreadthFirst(a, f) {
|
|
182
199
|
void 0;
|
183
200
|
|
184
201
|
if (e._tag === "Left") {
|
185
|
-
forEach_1(
|
202
|
+
forEach_1(v => buffer.push(v))(f(e.left));
|
186
203
|
} else {
|
187
204
|
out.push(e.right);
|
188
205
|
}
|
@@ -199,47 +216,51 @@ export function chainRecBreadthFirst(a, f) {
|
|
199
216
|
return tsplus_module_2.asImmutableArray(out);
|
200
217
|
}
|
201
218
|
/**
|
202
|
-
* @tsplus
|
219
|
+
* @tsplus pipeable fncts.ImmutableArray flatMapWithIndex
|
203
220
|
*/
|
204
221
|
|
205
|
-
function flatMapWithIndex_1(
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
222
|
+
function flatMapWithIndex_1(f) {
|
223
|
+
return self => {
|
224
|
+
let outLen = 0;
|
225
|
+
const selfArray = self._array;
|
226
|
+
const len = selfArray.length;
|
227
|
+
const temp = Array(len);
|
210
228
|
|
211
|
-
|
212
|
-
|
229
|
+
for (let i = 0; i < len; i++) {
|
230
|
+
const e = selfArray[i];
|
213
231
|
|
214
|
-
|
232
|
+
const arr = f(i, e)._array;
|
215
233
|
|
216
|
-
|
217
|
-
|
218
|
-
|
234
|
+
outLen += arr.length;
|
235
|
+
temp[i] = arr;
|
236
|
+
}
|
219
237
|
|
220
|
-
|
221
|
-
|
238
|
+
const out = Array(outLen);
|
239
|
+
let start = 0;
|
222
240
|
|
223
|
-
|
224
|
-
|
225
|
-
|
241
|
+
for (let i = 0; i < len; i++) {
|
242
|
+
const arr = temp[i];
|
243
|
+
const l = arr.length;
|
226
244
|
|
227
|
-
|
228
|
-
|
229
|
-
|
245
|
+
for (let j = 0; j < l; j++) {
|
246
|
+
out[j + start] = arr[j];
|
247
|
+
}
|
230
248
|
|
231
|
-
|
232
|
-
|
249
|
+
start += l;
|
250
|
+
}
|
233
251
|
|
234
|
-
|
252
|
+
return tsplus_module_2.asImmutableArray(out);
|
253
|
+
};
|
235
254
|
}
|
236
255
|
/**
|
237
|
-
* @tsplus
|
256
|
+
* @tsplus pipeable fncts.ImmutableArray flatMap
|
238
257
|
*/
|
239
258
|
|
240
259
|
|
241
|
-
function flatMap_1(
|
242
|
-
return
|
260
|
+
function flatMap_1(f) {
|
261
|
+
return self => {
|
262
|
+
return flatMapWithIndex_1((_, a) => f(a))(self);
|
263
|
+
};
|
243
264
|
}
|
244
265
|
/**
|
245
266
|
* @tsplus getter fncts.ImmutableArray flatten
|
@@ -247,55 +268,59 @@ function flatMap_1(self, f) {
|
|
247
268
|
|
248
269
|
|
249
270
|
function flatten_1(self) {
|
250
|
-
return flatMap_1(
|
271
|
+
return flatMap_1(identity)(self);
|
251
272
|
}
|
252
273
|
/**
|
253
274
|
* A useful recursion pattern for processing a `Array` to produce a new `Array`,
|
254
275
|
* often used for "chopping" up the input `Array`. Typically chop is called with some function
|
255
276
|
* that will consume an initial prefix of the `Array` and produce a value and the rest of the `Array`.
|
256
277
|
*
|
257
|
-
* @tsplus
|
278
|
+
* @tsplus pipeable fncts.ImmutableArray chop
|
258
279
|
*/
|
259
280
|
|
260
281
|
|
261
|
-
|
262
|
-
|
263
|
-
|
282
|
+
function chop_1(f) {
|
283
|
+
return as => {
|
284
|
+
const result = [];
|
285
|
+
let cs = as;
|
264
286
|
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
287
|
+
while (tsplus_module_5.isNonEmpty(cs)) {
|
288
|
+
const [b, c] = f(cs);
|
289
|
+
result.push(b);
|
290
|
+
cs = c;
|
291
|
+
}
|
270
292
|
|
271
|
-
|
293
|
+
return tsplus_module_2.asImmutableArray(result);
|
294
|
+
};
|
272
295
|
}
|
273
|
-
export const chop = f => as => chop_(as, f);
|
274
296
|
/**
|
275
|
-
* @tsplus
|
297
|
+
* @tsplus pipeable fncts.ImmutableArray collectWhile
|
276
298
|
*/
|
277
299
|
|
278
|
-
export function collectWhile_(as, f) {
|
279
|
-
const result = [];
|
280
300
|
|
281
|
-
|
282
|
-
|
301
|
+
export function collectWhile(f) {
|
302
|
+
return as => {
|
303
|
+
const result = [];
|
283
304
|
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
305
|
+
for (let i = 0; i < tsplus_module_5.length(as); i++) {
|
306
|
+
const o = f(as._array[i]);
|
307
|
+
|
308
|
+
if (tsplus_module_6.isJust(o)) {
|
309
|
+
result.push(o.value);
|
310
|
+
} else {
|
311
|
+
break;
|
312
|
+
}
|
288
313
|
}
|
289
|
-
}
|
290
314
|
|
291
|
-
|
315
|
+
return tsplus_module_2.asImmutableArray(result);
|
316
|
+
};
|
292
317
|
}
|
293
318
|
|
294
319
|
function comprehensionLoop(scope, input, f, g) {
|
295
320
|
if (input.length === 0) {
|
296
321
|
return g(...scope) ? tsplus_module_7.now(tsplus_module_2.make(f(...scope))) : tsplus_module_7.now(tsplus_module_2.empty());
|
297
322
|
} else {
|
298
|
-
return tsplus_module_9.
|
323
|
+
return tsplus_module_9.map(rs => flatten_1(rs))(_traverse_1(input[0])(tsplus_module_8.Applicative)(a => comprehensionLoop(append_1(a)(scope), input.slice(1), f, g)));
|
299
324
|
}
|
300
325
|
}
|
301
326
|
|
@@ -303,412 +328,490 @@ export function comprehension(input, f, g = () => true) {
|
|
303
328
|
return tsplus_module_10.run(comprehensionLoop(tsplus_module_2.empty(), input, f, g));
|
304
329
|
}
|
305
330
|
/**
|
306
|
-
* @tsplus
|
307
|
-
* @tsplus operator fncts.ImmutableArray +
|
331
|
+
* @tsplus pipeable fncts.ImmutableArray concat
|
332
|
+
* @tsplus pipeable-operator fncts.ImmutableArray +
|
308
333
|
*/
|
309
334
|
|
310
|
-
function concat_1(
|
311
|
-
|
335
|
+
function concat_1(that) {
|
336
|
+
return self => {
|
337
|
+
const lenx = self._array.length;
|
312
338
|
|
313
|
-
|
314
|
-
|
315
|
-
|
339
|
+
if (lenx === 0) {
|
340
|
+
return that;
|
341
|
+
}
|
316
342
|
|
317
|
-
|
343
|
+
const leny = that._array.length;
|
318
344
|
|
319
|
-
|
320
|
-
|
321
|
-
|
345
|
+
if (leny === 0) {
|
346
|
+
return self;
|
347
|
+
}
|
322
348
|
|
323
|
-
|
349
|
+
const r = Array(lenx + leny);
|
324
350
|
|
325
|
-
|
326
|
-
|
327
|
-
|
351
|
+
for (let i = 0; i < lenx; i++) {
|
352
|
+
r[i] = self._array[i];
|
353
|
+
}
|
328
354
|
|
329
|
-
|
330
|
-
|
331
|
-
|
355
|
+
for (let i = 0; i < leny; i++) {
|
356
|
+
r[i + lenx] = that._array[i];
|
357
|
+
}
|
332
358
|
|
333
|
-
|
359
|
+
return tsplus_module_2.asImmutableArray(r);
|
360
|
+
};
|
334
361
|
}
|
335
362
|
/**
|
336
|
-
* @tsplus
|
363
|
+
* @tsplus pipeable fncts.ImmutableArray deleteAt
|
337
364
|
*/
|
338
365
|
|
339
366
|
|
340
|
-
export function
|
341
|
-
return
|
367
|
+
export function deleteAt(i) {
|
368
|
+
return as => {
|
369
|
+
return isOutOfBound_1(i)(as) ? tsplus_module_11.nothing() : tsplus_module_11.just(unsafeDeleteAt_1(i)(as));
|
370
|
+
};
|
342
371
|
}
|
343
372
|
/**
|
344
|
-
* @tsplus
|
373
|
+
* @tsplus pipeable fncts.ImmutableArray difference
|
345
374
|
*/
|
346
375
|
|
347
|
-
export function
|
376
|
+
export function difference(ys,
|
348
377
|
/** @tsplus auto */
|
349
378
|
E) {
|
350
|
-
return
|
379
|
+
return self => {
|
380
|
+
return filter_1(a => !elem_1(a, E)(ys))(self);
|
381
|
+
};
|
351
382
|
}
|
352
383
|
/**
|
353
|
-
* @tsplus
|
384
|
+
* @tsplus pipeable fncts.ImmutableArray drop
|
354
385
|
*/
|
355
386
|
|
356
|
-
export function
|
357
|
-
return
|
387
|
+
export function drop(n) {
|
388
|
+
return self => {
|
389
|
+
return tsplus_module_4.slice(n)(self);
|
390
|
+
};
|
358
391
|
}
|
359
392
|
/**
|
360
|
-
* @tsplus
|
393
|
+
* @tsplus pipeable fncts.ImmutableArray dropLast
|
361
394
|
*/
|
362
395
|
|
363
|
-
export function
|
364
|
-
return
|
396
|
+
export function dropLast(n) {
|
397
|
+
return self => {
|
398
|
+
return tsplus_module_4.slice(0, tsplus_module_5.length(self) - n)(self);
|
399
|
+
};
|
365
400
|
}
|
366
401
|
/**
|
367
|
-
* @tsplus
|
402
|
+
* @tsplus pipeable fncts.ImmutableArray dropWhile
|
368
403
|
*/
|
369
404
|
|
370
|
-
export function
|
371
|
-
return
|
405
|
+
export function dropWhile(p) {
|
406
|
+
return self => {
|
407
|
+
return tsplus_module_4.slice(spanIndexLeft_1(p)(self))(self);
|
408
|
+
};
|
372
409
|
}
|
373
410
|
/**
|
374
|
-
* @tsplus
|
411
|
+
* @tsplus pipeable fncts.ImmutableArray dropLastWhile
|
375
412
|
*/
|
376
413
|
|
377
|
-
export function
|
378
|
-
return
|
414
|
+
export function dropLastWhile(p) {
|
415
|
+
return as => {
|
416
|
+
return tsplus_module_4.slice(0, spanIndexRight_1(p)(as) + 1)(as);
|
417
|
+
};
|
379
418
|
}
|
380
419
|
/**
|
381
420
|
* Test if a value is a member of an array. Takes an `Eq<A>` as a single
|
382
421
|
* argument which returns the function to use to search for a value of type `A` in
|
383
422
|
* an array of type `ImmutableArray<A>`.
|
384
423
|
*
|
385
|
-
* @tsplus
|
424
|
+
* @tsplus pipeable fncts.ImmutableArray elem
|
386
425
|
*/
|
387
426
|
|
388
|
-
function elem_1(
|
427
|
+
function elem_1(a,
|
389
428
|
/** @tsplus auto */
|
390
429
|
E) {
|
391
|
-
|
430
|
+
return as => {
|
431
|
+
const predicate = element => E.equals(element, a);
|
392
432
|
|
393
|
-
|
433
|
+
const len = tsplus_module_5.length(as);
|
394
434
|
|
395
|
-
|
396
|
-
|
397
|
-
|
435
|
+
for (let i = 0; i < len; i++) {
|
436
|
+
if (predicate(as._array[i])) {
|
437
|
+
return true;
|
438
|
+
}
|
398
439
|
}
|
399
|
-
}
|
400
440
|
|
401
|
-
|
441
|
+
return false;
|
442
|
+
};
|
402
443
|
}
|
403
444
|
|
404
|
-
export function
|
405
|
-
return
|
445
|
+
export function every(p) {
|
446
|
+
return self => {
|
447
|
+
return everyWithIndex_1((_, a) => p(a))(self);
|
448
|
+
};
|
406
449
|
}
|
407
450
|
|
408
|
-
function everyWithIndex_1(
|
409
|
-
|
410
|
-
|
451
|
+
function everyWithIndex_1(p) {
|
452
|
+
return self => {
|
453
|
+
let result = true;
|
454
|
+
let i = 0;
|
411
455
|
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
456
|
+
while (result && i < tsplus_module_5.length(self)) {
|
457
|
+
result = p(i, self._array[i]);
|
458
|
+
i++;
|
459
|
+
}
|
416
460
|
|
417
|
-
|
461
|
+
return result;
|
462
|
+
};
|
418
463
|
}
|
419
464
|
/**
|
420
|
-
* @tsplus
|
465
|
+
* @tsplus pipeable fncts.ImmutableArray exists
|
421
466
|
*/
|
422
467
|
|
423
468
|
|
424
|
-
export function
|
425
|
-
|
426
|
-
|
469
|
+
export function exists(p) {
|
470
|
+
return self => {
|
471
|
+
let result = false;
|
472
|
+
let i = 0;
|
427
473
|
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
474
|
+
while (!result && i < tsplus_module_5.length(self)) {
|
475
|
+
result = p(self._array[i]);
|
476
|
+
i++;
|
477
|
+
}
|
432
478
|
|
433
|
-
|
479
|
+
return result;
|
480
|
+
};
|
434
481
|
}
|
435
482
|
|
436
|
-
function filter_1(
|
437
|
-
return
|
483
|
+
function filter_1(p) {
|
484
|
+
return self => {
|
485
|
+
return filterWithIndex_1((_, a) => p(a))(self);
|
486
|
+
};
|
438
487
|
}
|
439
488
|
|
440
|
-
function filterWithIndex_1(
|
441
|
-
|
489
|
+
function filterWithIndex_1(p) {
|
490
|
+
return self => {
|
491
|
+
const result = [];
|
442
492
|
|
443
|
-
|
444
|
-
|
493
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
494
|
+
const a = self._array[i];
|
445
495
|
|
446
|
-
|
447
|
-
|
496
|
+
if (p(i, a)) {
|
497
|
+
result.push(a);
|
498
|
+
}
|
448
499
|
}
|
449
|
-
}
|
450
500
|
|
451
|
-
|
501
|
+
return tsplus_module_2.asImmutableArray(result);
|
502
|
+
};
|
452
503
|
}
|
453
504
|
/**
|
454
|
-
* @tsplus
|
505
|
+
* @tsplus pipeable fncts.ImmutableArray filterMapWithIndex
|
455
506
|
*/
|
456
507
|
|
457
508
|
|
458
|
-
function filterMapWithIndex_1(
|
459
|
-
|
509
|
+
function filterMapWithIndex_1(f) {
|
510
|
+
return fa => {
|
511
|
+
const result = [];
|
460
512
|
|
461
|
-
|
462
|
-
|
513
|
+
for (let i = 0; i < tsplus_module_5.length(fa); i++) {
|
514
|
+
const maybeB = f(i, unsafeGet_1(fa, i));
|
463
515
|
|
464
|
-
|
465
|
-
|
516
|
+
if (tsplus_module_6.isJust(maybeB)) {
|
517
|
+
result.push(maybeB.value);
|
518
|
+
}
|
466
519
|
}
|
467
|
-
}
|
468
520
|
|
469
|
-
|
521
|
+
return tsplus_module_2.asImmutableArray(result);
|
522
|
+
};
|
470
523
|
}
|
471
524
|
/**
|
472
|
-
* @tsplus
|
525
|
+
* @tsplus pipeable fncts.ImmutableArray filterMap
|
473
526
|
*/
|
474
527
|
|
475
528
|
|
476
|
-
export function
|
477
|
-
return
|
529
|
+
export function filterMap(f) {
|
530
|
+
return self => {
|
531
|
+
return filterMapWithIndex_1((_, a) => f(a))(self);
|
532
|
+
};
|
478
533
|
}
|
479
|
-
export function
|
480
|
-
return
|
534
|
+
export function find(p) {
|
535
|
+
return self => {
|
536
|
+
return findWithIndex_1((_, a) => p(a))(self);
|
537
|
+
};
|
481
538
|
}
|
482
539
|
/**
|
483
|
-
* @tsplus
|
540
|
+
* @tsplus pipeable fncts.ImmutableArray findIndex
|
484
541
|
*/
|
485
542
|
|
486
|
-
export function
|
487
|
-
return
|
543
|
+
export function findIndex(predicate) {
|
544
|
+
return as => {
|
545
|
+
return findMapWithIndex_1((i, a) => predicate(a) ? tsplus_module_11.just(i) : tsplus_module_11.nothing())(as);
|
546
|
+
};
|
488
547
|
}
|
489
548
|
|
490
|
-
function findWithIndex_1(
|
491
|
-
|
549
|
+
function findWithIndex_1(p) {
|
550
|
+
return as => {
|
551
|
+
const len = tsplus_module_5.length(as);
|
492
552
|
|
493
|
-
|
494
|
-
|
495
|
-
|
553
|
+
for (let i = 0; i < len; i++) {
|
554
|
+
if (p(i, as._array[i])) {
|
555
|
+
return tsplus_module_11.just(as._array[i]);
|
556
|
+
}
|
496
557
|
}
|
497
|
-
}
|
498
558
|
|
499
|
-
|
559
|
+
return tsplus_module_11.nothing();
|
560
|
+
};
|
500
561
|
}
|
501
562
|
/**
|
502
|
-
* @tsplus
|
563
|
+
* @tsplus pipeable fncts.ImmutableArray findMap
|
503
564
|
*/
|
504
565
|
|
505
566
|
|
506
|
-
export function
|
507
|
-
return
|
567
|
+
export function findMap(f) {
|
568
|
+
return as => {
|
569
|
+
return findMapWithIndex_1((_, a) => f(a))(as);
|
570
|
+
};
|
508
571
|
}
|
509
572
|
/**
|
510
|
-
* @tsplus
|
573
|
+
* @tsplus pipeable fncts.ImmutableArray findMapWithIndex
|
511
574
|
*/
|
512
575
|
|
513
|
-
function findMapWithIndex_1(
|
514
|
-
|
576
|
+
function findMapWithIndex_1(f) {
|
577
|
+
return as => {
|
578
|
+
const len = tsplus_module_5.length(as);
|
515
579
|
|
516
|
-
|
517
|
-
|
580
|
+
for (let i = 0; i < len; i++) {
|
581
|
+
const v = f(i, as._array[i]);
|
518
582
|
|
519
|
-
|
520
|
-
|
583
|
+
if (tsplus_module_6.isJust(v)) {
|
584
|
+
return v;
|
585
|
+
}
|
521
586
|
}
|
522
|
-
}
|
523
587
|
|
524
|
-
|
588
|
+
return tsplus_module_11.nothing();
|
589
|
+
};
|
525
590
|
}
|
526
591
|
|
527
|
-
export function
|
528
|
-
|
592
|
+
export function findLast(p) {
|
593
|
+
return as => {
|
594
|
+
const len = tsplus_module_5.length(as);
|
529
595
|
|
530
|
-
|
531
|
-
|
532
|
-
|
596
|
+
for (let i = len - 1; i >= 0; i--) {
|
597
|
+
if (p(as._array[i])) {
|
598
|
+
return tsplus_module_11.just(as._array[i]);
|
599
|
+
}
|
533
600
|
}
|
534
|
-
}
|
535
601
|
|
536
|
-
|
602
|
+
return tsplus_module_11.nothing();
|
603
|
+
};
|
537
604
|
}
|
538
605
|
/**
|
539
|
-
* @tsplus
|
606
|
+
* @tsplus pipeable fncts.ImmutableArray findLastIndex
|
540
607
|
*/
|
541
608
|
|
542
|
-
export function
|
543
|
-
return
|
609
|
+
export function findLastIndex(p) {
|
610
|
+
return self => {
|
611
|
+
return findLastMapWithIndex_1((i, a) => p(a) ? tsplus_module_11.just(i) : tsplus_module_11.nothing())(self);
|
612
|
+
};
|
544
613
|
}
|
545
614
|
/**
|
546
|
-
* @tsplus
|
615
|
+
* @tsplus pipeable fncts.ImmutableArray findLastMap
|
547
616
|
*/
|
548
617
|
|
549
|
-
export function
|
550
|
-
return
|
618
|
+
export function findLastMap(f) {
|
619
|
+
return as => {
|
620
|
+
return findLastMapWithIndex_1((_, a) => f(a))(as);
|
621
|
+
};
|
551
622
|
}
|
552
623
|
/**
|
553
|
-
* @tsplus
|
624
|
+
* @tsplus pipeable fncts.ImmutableArray findLastMapWithIndex
|
554
625
|
*/
|
555
626
|
|
556
|
-
function findLastMapWithIndex_1(
|
557
|
-
|
627
|
+
function findLastMapWithIndex_1(f) {
|
628
|
+
return as => {
|
629
|
+
const len = tsplus_module_5.length(as);
|
558
630
|
|
559
|
-
|
560
|
-
|
631
|
+
for (let i = len - 1; i >= 0; i--) {
|
632
|
+
const v = f(i, as._array[i]);
|
561
633
|
|
562
|
-
|
563
|
-
|
634
|
+
if (tsplus_module_6.isJust(v)) {
|
635
|
+
return v;
|
636
|
+
}
|
564
637
|
}
|
565
|
-
}
|
566
638
|
|
567
|
-
|
639
|
+
return tsplus_module_11.nothing();
|
640
|
+
};
|
568
641
|
}
|
569
642
|
/**
|
570
|
-
* @tsplus
|
571
|
-
* @tsplus
|
643
|
+
* @tsplus pipeable fncts.ImmutableArray foldLeftWithIndex
|
644
|
+
* @tsplus pipeable fncts.MutableArray foldLeftWithIndex
|
572
645
|
*/
|
573
646
|
|
574
647
|
|
575
|
-
function foldLeftWithIndex_1(
|
576
|
-
|
577
|
-
|
648
|
+
function foldLeftWithIndex_1(b, f) {
|
649
|
+
return self => {
|
650
|
+
const len = tsplus_module_5.length(self);
|
651
|
+
let r = b;
|
578
652
|
|
579
|
-
|
580
|
-
|
581
|
-
|
653
|
+
for (let i = 0; i < len; i++) {
|
654
|
+
r = f(i, r, self._array[i]);
|
655
|
+
}
|
582
656
|
|
583
|
-
|
657
|
+
return r;
|
658
|
+
};
|
584
659
|
}
|
585
660
|
/**
|
586
|
-
* @tsplus
|
587
|
-
* @tsplus
|
661
|
+
* @tsplus pipeable fncts.ImmutableArray foldLeft
|
662
|
+
* @tsplus pipeable fncts.MutableArray foldLeft
|
588
663
|
*/
|
589
664
|
|
590
665
|
|
591
|
-
function foldLeft_1(
|
592
|
-
return
|
666
|
+
function foldLeft_1(b, f) {
|
667
|
+
return self => {
|
668
|
+
return foldLeftWithIndex_1(b, (_, b, a) => f(b, a))(self);
|
669
|
+
};
|
593
670
|
}
|
594
671
|
/**
|
595
|
-
* @tsplus
|
596
|
-
* @tsplus
|
672
|
+
* @tsplus pipeable fncts.ImmutableArray foldLeftWhile
|
673
|
+
* @tsplus pipeable fncts.MutableArray foldLeftWhile
|
597
674
|
*/
|
598
675
|
|
599
676
|
|
600
|
-
export function
|
601
|
-
return
|
677
|
+
export function foldLeftWhile(b, p, f) {
|
678
|
+
return self => {
|
679
|
+
return foldLeftWithIndexWhile_1(b, p, (_, b, a) => f(b, a))(self);
|
680
|
+
};
|
602
681
|
}
|
603
682
|
/**
|
604
|
-
* @tsplus
|
605
|
-
* @tsplus
|
683
|
+
* @tsplus pipeable fncts.ImmutableArray foldLeftWithIndexWhile
|
684
|
+
* @tsplus pipeable fncts.MutableArray foldLeftWithIndexWhile
|
606
685
|
*/
|
607
686
|
|
608
|
-
function foldLeftWithIndexWhile_1(
|
609
|
-
|
610
|
-
|
687
|
+
function foldLeftWithIndexWhile_1(b, p, f) {
|
688
|
+
return self => {
|
689
|
+
let out = b;
|
690
|
+
let cont = p(out);
|
611
691
|
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
692
|
+
for (let i = 0; cont && i < tsplus_module_5.length(self); i++) {
|
693
|
+
out = f(i, out, self._array[i]);
|
694
|
+
cont = p(out);
|
695
|
+
}
|
616
696
|
|
617
|
-
|
697
|
+
return out;
|
698
|
+
};
|
618
699
|
}
|
619
700
|
/**
|
620
|
-
* @tsplus
|
701
|
+
* @tsplus pipeable fncts.ImmutableArray fold
|
621
702
|
*/
|
622
703
|
|
623
704
|
|
624
|
-
function fold_1(
|
705
|
+
function fold_1(
|
625
706
|
/** @tsplus auto */
|
626
707
|
M) {
|
627
|
-
return
|
708
|
+
return self => {
|
709
|
+
return foldLeft_1(M.nat, M.combine)(self);
|
710
|
+
};
|
628
711
|
}
|
629
712
|
/**
|
630
|
-
* @tsplus
|
713
|
+
* @tsplus pipeable fncts.ImmutableArray foldMapWithIndex
|
631
714
|
*/
|
632
715
|
|
633
716
|
|
634
|
-
function foldMapWithIndex_1(
|
717
|
+
function foldMapWithIndex_1(f,
|
635
718
|
/** @tsplus auto */
|
636
719
|
M) {
|
637
|
-
return
|
720
|
+
return self => {
|
721
|
+
return foldLeftWithIndex_1(M.nat, (i, b, a) => M.combine(b, f(i, a)))(self);
|
722
|
+
};
|
638
723
|
}
|
639
724
|
/**
|
640
|
-
* @tsplus
|
725
|
+
* @tsplus pipeable fncts.ImmutableArray foldMap
|
641
726
|
*/
|
642
727
|
|
643
728
|
|
644
|
-
export function
|
729
|
+
export function foldMap(f,
|
645
730
|
/** @tsplus auto */
|
646
731
|
M) {
|
647
|
-
return
|
732
|
+
return self => {
|
733
|
+
return foldMapWithIndex_1((_, a) => f(a), M)(self);
|
734
|
+
};
|
648
735
|
}
|
649
736
|
/**
|
650
|
-
* @tsplus
|
737
|
+
* @tsplus pipeable fncts.ImmutableArray foldRightWithIndex
|
651
738
|
*/
|
652
739
|
|
653
|
-
function foldRightWithIndex_1(
|
654
|
-
|
740
|
+
function foldRightWithIndex_1(b, f) {
|
741
|
+
return self => {
|
742
|
+
let r = b;
|
655
743
|
|
656
|
-
|
657
|
-
|
658
|
-
|
744
|
+
for (let i = tsplus_module_5.length(self) - 1; i >= 0; i--) {
|
745
|
+
r = f(i, self._array[i], r);
|
746
|
+
}
|
659
747
|
|
660
|
-
|
748
|
+
return r;
|
749
|
+
};
|
661
750
|
}
|
662
751
|
/**
|
663
|
-
* @tsplus
|
752
|
+
* @tsplus pipeable fncts.ImmutableArray foldRight
|
664
753
|
*/
|
665
754
|
|
666
755
|
|
667
|
-
export function
|
668
|
-
return
|
756
|
+
export function foldRight(b, f) {
|
757
|
+
return self => {
|
758
|
+
return foldRightWithIndex_1(b, (_, a, b) => f(a, b))(self);
|
759
|
+
};
|
669
760
|
}
|
670
761
|
/**
|
671
|
-
* @tsplus
|
762
|
+
* @tsplus pipeable fncts.ImmutableArray foldRighWhile
|
672
763
|
*/
|
673
764
|
|
674
|
-
export function
|
675
|
-
return
|
765
|
+
export function foldRightWhile(b, p, f) {
|
766
|
+
return self => {
|
767
|
+
return foldRightWithIndexWhile_1(b, p, (_, a, b) => f(a, b))(self);
|
768
|
+
};
|
676
769
|
}
|
677
770
|
/**
|
678
|
-
* @tsplus
|
771
|
+
* @tsplus pipeable fncts.ImmutableArray foldRightWithIndexWhile
|
679
772
|
*/
|
680
773
|
|
681
|
-
function foldRightWithIndexWhile_1(
|
682
|
-
|
683
|
-
|
774
|
+
function foldRightWithIndexWhile_1(b, predicate, f) {
|
775
|
+
return self => {
|
776
|
+
let out = b;
|
777
|
+
let cont = predicate(out);
|
684
778
|
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
779
|
+
for (let i = tsplus_module_5.length(self) - 1; cont && i >= 0; i--) {
|
780
|
+
out = f(i, self._array[i], out);
|
781
|
+
cont = predicate(out);
|
782
|
+
}
|
689
783
|
|
690
|
-
|
784
|
+
return out;
|
785
|
+
};
|
691
786
|
}
|
692
787
|
/**
|
693
|
-
* @tsplus
|
788
|
+
* @tsplus pipeable fncts.ImmutableArray forEach
|
694
789
|
*/
|
695
790
|
|
696
791
|
|
697
|
-
function forEach_1(
|
698
|
-
return
|
792
|
+
function forEach_1(f) {
|
793
|
+
return self => {
|
794
|
+
return forEach_1(f)(self);
|
795
|
+
};
|
699
796
|
}
|
700
797
|
/**
|
701
|
-
* @tsplus
|
702
|
-
* @tsplus
|
798
|
+
* @tsplus pipeable fncts.ImmutableArray get
|
799
|
+
* @tsplus pipeable fncts.MutableArray get
|
703
800
|
*/
|
704
801
|
|
705
802
|
|
706
|
-
function get_1(
|
707
|
-
return
|
803
|
+
function get_1(i) {
|
804
|
+
return self => {
|
805
|
+
return isOutOfBound_1(i)(self) ? tsplus_module_11.nothing() : tsplus_module_11.just(self._array[i]);
|
806
|
+
};
|
708
807
|
}
|
808
|
+
/**
|
809
|
+
* @tsplus pipeable fncts.ImmutableArray group
|
810
|
+
*/
|
811
|
+
|
709
812
|
|
710
813
|
export function group(E) {
|
711
|
-
return
|
814
|
+
return chop_1(self => {
|
712
815
|
const h = self._array[0];
|
713
816
|
const out = [h];
|
714
817
|
let i = 1;
|
@@ -723,35 +826,30 @@ export function group(E) {
|
|
723
826
|
}
|
724
827
|
}
|
725
828
|
|
726
|
-
return [tsplus_module_12.unsafeAsNonEmptyArray(out), tsplus_module_4.
|
829
|
+
return [tsplus_module_12.unsafeAsNonEmptyArray(out), tsplus_module_4.slice(i)(self)];
|
727
830
|
});
|
728
831
|
}
|
729
832
|
/**
|
730
|
-
* @tsplus
|
833
|
+
* @tsplus pipeable fncts.ImmutableArray groupBy
|
731
834
|
*/
|
732
835
|
|
733
|
-
export function
|
734
|
-
return
|
735
|
-
}
|
736
|
-
/**
|
737
|
-
* @tsplus fluent fncts.ImmutableArray groupBy
|
738
|
-
*/
|
739
|
-
|
740
|
-
export function groupBy_(self, f) {
|
741
|
-
const out = {};
|
836
|
+
export function groupBy(f) {
|
837
|
+
return self => {
|
838
|
+
const out = {};
|
742
839
|
|
743
|
-
|
744
|
-
|
745
|
-
|
840
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
841
|
+
const a = self._array[i];
|
842
|
+
const k = f(a);
|
746
843
|
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
844
|
+
if (Object.prototype.hasOwnProperty.call(out, k)) {
|
845
|
+
out[k].push(a);
|
846
|
+
} else {
|
847
|
+
out[k] = [a];
|
848
|
+
}
|
751
849
|
}
|
752
|
-
}
|
753
850
|
|
754
|
-
|
851
|
+
return tsplus_module_14.map(tsplus_module_12.from)(tsplus_module_13.Dictionary.get(out));
|
852
|
+
};
|
755
853
|
}
|
756
854
|
/**
|
757
855
|
* @tsplus getter fncts.ImmutableArray head
|
@@ -766,27 +864,37 @@ export function head(self) {
|
|
766
864
|
|
767
865
|
export function init(self) {
|
768
866
|
const len = tsplus_module_5.length(self);
|
769
|
-
return len === 0 ? tsplus_module_11.nothing() : tsplus_module_11.just(tsplus_module_4.
|
867
|
+
return len === 0 ? tsplus_module_11.nothing() : tsplus_module_11.just(tsplus_module_4.slice(0, len - 1)(self));
|
770
868
|
}
|
771
869
|
/**
|
772
|
-
* @tsplus
|
870
|
+
* @tsplus pipeable fncts.ImmutableArray insertAt
|
773
871
|
*/
|
774
872
|
|
775
|
-
export function
|
776
|
-
return
|
873
|
+
export function insertAt(i, a) {
|
874
|
+
return self => {
|
875
|
+
return isOutOfBound_1(i)(self) ? tsplus_module_11.nothing() : tsplus_module_11.just(unsafeInsertAt_1(i, a)(self));
|
876
|
+
};
|
777
877
|
}
|
778
878
|
/**
|
779
|
-
* @tsplus
|
879
|
+
* @tsplus pipeable fncts.ImmutableArray intersection
|
780
880
|
*/
|
781
881
|
|
782
|
-
export function
|
882
|
+
export function intersection(that,
|
783
883
|
/** @tsplus auto */
|
784
884
|
E) {
|
785
|
-
return
|
885
|
+
return self => {
|
886
|
+
return filter_1(a => elem_1(a, E)(that))(self);
|
887
|
+
};
|
786
888
|
}
|
787
|
-
|
788
|
-
|
789
|
-
|
889
|
+
/**
|
890
|
+
* @tsplus pipeable fncts.ImmutableArray intersperse
|
891
|
+
*/
|
892
|
+
|
893
|
+
export function intersperse(a) {
|
894
|
+
return self => {
|
895
|
+
const len = tsplus_module_5.length(self);
|
896
|
+
return len === 0 ? self : prepend_1(unsafeGet_1(self, 0))(prependAll_1(a)(tsplus_module_4.slice(1, len)(self)));
|
897
|
+
};
|
790
898
|
}
|
791
899
|
/**
|
792
900
|
* @tsplus fluent fncts.ImmutableArray isEmpty
|
@@ -796,27 +904,31 @@ function isEmpty_1(self) {
|
|
796
904
|
return tsplus_module_5.length(self) === 0;
|
797
905
|
}
|
798
906
|
/**
|
799
|
-
* @tsplus
|
907
|
+
* @tsplus pipeable fncts.ImmutableArray isOutOfBound
|
800
908
|
*/
|
801
909
|
|
802
910
|
|
803
|
-
function isOutOfBound_1(
|
804
|
-
return
|
911
|
+
function isOutOfBound_1(i) {
|
912
|
+
return self => {
|
913
|
+
return i < 0 || i >= tsplus_module_5.length(self);
|
914
|
+
};
|
805
915
|
}
|
806
916
|
/**
|
807
|
-
* @tsplus
|
917
|
+
* @tsplus pipeable fncts.ImmutableArray join
|
808
918
|
*/
|
809
919
|
|
810
920
|
|
811
|
-
export function join(
|
812
|
-
return self
|
921
|
+
export function join(separator) {
|
922
|
+
return self => {
|
923
|
+
return self._array.join(separator);
|
924
|
+
};
|
813
925
|
}
|
814
926
|
/**
|
815
927
|
* @tsplus getter fncts.ImmutableArray last
|
816
928
|
*/
|
817
929
|
|
818
930
|
export function last(self) {
|
819
|
-
return get_1(
|
931
|
+
return get_1(tsplus_module_5.length(self) - 1)(self);
|
820
932
|
}
|
821
933
|
/**
|
822
934
|
* @tsplus getter fncts.ImmutableArray length
|
@@ -846,59 +958,69 @@ export function lefts(self) {
|
|
846
958
|
return tsplus_module_2.asImmutableArray(ls);
|
847
959
|
}
|
848
960
|
/**
|
849
|
-
* @tsplus
|
961
|
+
* @tsplus pipeable fncts.ImmutableArray map
|
850
962
|
*/
|
851
963
|
|
852
|
-
function map_1(
|
853
|
-
return
|
964
|
+
function map_1(f) {
|
965
|
+
return self => {
|
966
|
+
return mapWithIndex_1((_, a) => f(a))(self);
|
967
|
+
};
|
854
968
|
}
|
855
969
|
/**
|
856
|
-
* @tsplus
|
970
|
+
* @tsplus pipeable fncts.ImmutableArray mapAccum
|
857
971
|
*/
|
858
972
|
|
859
973
|
|
860
|
-
export function
|
861
|
-
|
862
|
-
|
974
|
+
export function mapAccum(s, f) {
|
975
|
+
return self => {
|
976
|
+
const bs = Array(tsplus_module_5.length(self));
|
977
|
+
let state = s;
|
863
978
|
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
979
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
980
|
+
const result = f(state, self._array[i]);
|
981
|
+
bs[i] = result[0];
|
982
|
+
state = result[1];
|
983
|
+
}
|
869
984
|
|
870
|
-
|
985
|
+
return [tsplus_module_2.asImmutableArray(bs), state];
|
986
|
+
};
|
871
987
|
}
|
872
988
|
/**
|
873
|
-
* @tsplus
|
989
|
+
* @tsplus pipeable fncts.ImmutableArray mapWithIndex
|
874
990
|
*/
|
875
991
|
|
876
|
-
function mapWithIndex_1(
|
877
|
-
|
878
|
-
|
992
|
+
function mapWithIndex_1(f) {
|
993
|
+
return self => {
|
994
|
+
const len = self._array.length;
|
995
|
+
const bs = Array(len);
|
879
996
|
|
880
|
-
|
881
|
-
|
882
|
-
|
997
|
+
for (let i = 0; i < len; i++) {
|
998
|
+
bs[i] = f(i, self._array[i]);
|
999
|
+
}
|
883
1000
|
|
884
|
-
|
1001
|
+
return tsplus_module_2.asImmutableArray(bs);
|
1002
|
+
};
|
885
1003
|
}
|
886
1004
|
/**
|
887
|
-
* @tsplus
|
1005
|
+
* @tsplus pipeable fncts.ImmutableArray modifyAt
|
888
1006
|
*/
|
889
1007
|
|
890
1008
|
|
891
|
-
export function
|
892
|
-
return
|
1009
|
+
export function modifyAt(i, f) {
|
1010
|
+
return self => {
|
1011
|
+
return isOutOfBound_1(i)(self) ? tsplus_module_11.nothing() : tsplus_module_11.just(unsafeModifyAt_1(i, f)(self));
|
1012
|
+
};
|
893
1013
|
}
|
894
1014
|
/**
|
895
|
-
* @tsplus
|
1015
|
+
* @tsplus pipeable fncts.ImmutableArray mutate
|
896
1016
|
*/
|
897
1017
|
|
898
|
-
function mutate_1(
|
899
|
-
|
900
|
-
|
901
|
-
|
1018
|
+
function mutate_1(f) {
|
1019
|
+
return self => {
|
1020
|
+
const mut = mutableClone_1(self);
|
1021
|
+
f(mut);
|
1022
|
+
return tsplus_module_2.asImmutableArray(mut);
|
1023
|
+
};
|
902
1024
|
}
|
903
1025
|
/**
|
904
1026
|
* @tsplus getter fncts.ImmutableArray mutableClone
|
@@ -906,95 +1028,106 @@ function mutate_1(self, f) {
|
|
906
1028
|
|
907
1029
|
|
908
1030
|
function mutableClone_1(self) {
|
909
|
-
return tsplus_module_4.
|
1031
|
+
return tsplus_module_4.slice(0)(self)._array;
|
910
1032
|
}
|
911
1033
|
|
912
|
-
function partitionWithIndex_1(
|
913
|
-
|
914
|
-
|
1034
|
+
function partitionWithIndex_1(p) {
|
1035
|
+
return self => {
|
1036
|
+
const left = [];
|
1037
|
+
const right = [];
|
915
1038
|
|
916
|
-
|
917
|
-
|
1039
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
1040
|
+
const a = self._array[i];
|
918
1041
|
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
1042
|
+
if (p(i, a)) {
|
1043
|
+
right.push(a);
|
1044
|
+
} else {
|
1045
|
+
left.push(a);
|
1046
|
+
}
|
923
1047
|
}
|
924
|
-
}
|
925
1048
|
|
926
|
-
|
1049
|
+
return [tsplus_module_2.asImmutableArray(left), tsplus_module_2.asImmutableArray(right)];
|
1050
|
+
};
|
927
1051
|
}
|
928
1052
|
|
929
|
-
export function
|
930
|
-
return
|
1053
|
+
export function partition(p) {
|
1054
|
+
return self => {
|
1055
|
+
return partitionWithIndex_1((_, a) => p(a))(self);
|
1056
|
+
};
|
931
1057
|
}
|
932
1058
|
/**
|
933
|
-
* @tsplus
|
1059
|
+
* @tsplus pipeable fncts.ImmutableArray partitionMapWithIndex
|
934
1060
|
*/
|
935
1061
|
|
936
|
-
function partitionMapWithIndex_1(
|
937
|
-
|
938
|
-
|
1062
|
+
function partitionMapWithIndex_1(f) {
|
1063
|
+
return self => {
|
1064
|
+
const left = [];
|
1065
|
+
const right = [];
|
939
1066
|
|
940
|
-
|
941
|
-
|
942
|
-
|
1067
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
1068
|
+
const ea = f(i, self._array[i]);
|
1069
|
+
void 0;
|
943
1070
|
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
1071
|
+
switch (ea._tag) {
|
1072
|
+
case "Left"
|
1073
|
+
/* EitherTag.Left */
|
1074
|
+
:
|
1075
|
+
left.push(ea.left);
|
1076
|
+
break;
|
950
1077
|
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
1078
|
+
case "Right"
|
1079
|
+
/* EitherTag.Right */
|
1080
|
+
:
|
1081
|
+
right.push(ea.right);
|
1082
|
+
break;
|
1083
|
+
}
|
956
1084
|
}
|
957
|
-
}
|
958
1085
|
|
959
|
-
|
1086
|
+
return [tsplus_module_2.asImmutableArray(left), tsplus_module_2.asImmutableArray(right)];
|
1087
|
+
};
|
960
1088
|
}
|
961
1089
|
/**
|
962
|
-
* @tsplus
|
1090
|
+
* @tsplus pipeable fncts.ImmutableArray partitionMap
|
963
1091
|
*/
|
964
1092
|
|
965
1093
|
|
966
|
-
export function
|
967
|
-
return
|
1094
|
+
export function partitionMap(f) {
|
1095
|
+
return self => {
|
1096
|
+
return partitionMapWithIndex_1((_, a) => f(a))(self);
|
1097
|
+
};
|
968
1098
|
}
|
969
1099
|
/**
|
970
|
-
* @tsplus
|
1100
|
+
* @tsplus pipeable fncts.ImmutableArray prepend
|
971
1101
|
*/
|
972
1102
|
|
973
|
-
function prepend_1(
|
974
|
-
|
975
|
-
|
976
|
-
|
1103
|
+
function prepend_1(head) {
|
1104
|
+
return self => {
|
1105
|
+
const len = tsplus_module_5.length(self);
|
1106
|
+
const out = Array(len + 1);
|
1107
|
+
out[0] = head;
|
977
1108
|
|
978
|
-
|
979
|
-
|
980
|
-
|
1109
|
+
for (let i = 0; i < len; i++) {
|
1110
|
+
out[i + 1] = self._array[i];
|
1111
|
+
}
|
981
1112
|
|
982
|
-
|
1113
|
+
return tsplus_module_2.asImmutableArray(out);
|
1114
|
+
};
|
983
1115
|
}
|
984
1116
|
/**
|
985
|
-
* @tsplus
|
986
|
-
* @tsplus fluent fncts.MutableArray prependAll
|
1117
|
+
* @tsplus pipeable fncts.ImmutableArray prependAll
|
987
1118
|
*/
|
988
1119
|
|
989
1120
|
|
990
|
-
function prependAll_1(
|
991
|
-
|
1121
|
+
function prependAll_1(a) {
|
1122
|
+
return self => {
|
1123
|
+
const out = [];
|
992
1124
|
|
993
|
-
|
994
|
-
|
995
|
-
|
1125
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
1126
|
+
out.push(a, self._array[i]);
|
1127
|
+
}
|
996
1128
|
|
997
|
-
|
1129
|
+
return tsplus_module_2.asImmutableArray(out);
|
1130
|
+
};
|
998
1131
|
}
|
999
1132
|
/**
|
1000
1133
|
* @tsplus getter fncts.ImmutableArray reverse
|
@@ -1037,133 +1170,151 @@ export function rights(self) {
|
|
1037
1170
|
return tsplus_module_2.asImmutableArray(rs);
|
1038
1171
|
}
|
1039
1172
|
/**
|
1040
|
-
* @tsplus
|
1173
|
+
* @tsplus pipeable fncts.ImmutableArray rotate
|
1041
1174
|
*/
|
1042
1175
|
|
1043
|
-
function rotate_1(
|
1044
|
-
|
1176
|
+
function rotate_1(n) {
|
1177
|
+
return self => {
|
1178
|
+
const len = tsplus_module_5.length(self);
|
1045
1179
|
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1180
|
+
if (n === 0 || len <= 1 || len === Math.abs(n)) {
|
1181
|
+
return self;
|
1182
|
+
} else if (n < 0) {
|
1183
|
+
return rotate_1(len + n)(self);
|
1184
|
+
} else {
|
1185
|
+
return concat_1(tsplus_module_4.slice(0, len - n)(self))(tsplus_module_4.slice(-n)(self));
|
1186
|
+
}
|
1187
|
+
};
|
1053
1188
|
}
|
1054
1189
|
/**
|
1055
|
-
* @tsplus
|
1190
|
+
* @tsplus pipeable fncts.ImmutableArray scanLeft
|
1056
1191
|
*/
|
1057
1192
|
|
1058
1193
|
|
1059
|
-
export function
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1194
|
+
export function scanLeft(b, f) {
|
1195
|
+
return self => {
|
1196
|
+
const l = tsplus_module_5.length(self);
|
1197
|
+
const r = Array(l + 1);
|
1198
|
+
r[0] = b;
|
1063
1199
|
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1200
|
+
for (let i = 0; i < l; i++) {
|
1201
|
+
r[i + 1] = f(r[i], self._array[i]);
|
1202
|
+
}
|
1067
1203
|
|
1068
|
-
|
1204
|
+
return tsplus_module_2.asImmutableArray(r);
|
1205
|
+
};
|
1069
1206
|
}
|
1070
1207
|
/**
|
1071
|
-
* @tsplus
|
1208
|
+
* @tsplus pipeable fncts.ImmutableArray scanRight
|
1072
1209
|
*/
|
1073
1210
|
|
1074
|
-
export function
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1211
|
+
export function scanRight(b, f) {
|
1212
|
+
return self => {
|
1213
|
+
const l = tsplus_module_5.length(self);
|
1214
|
+
const r = Array(l + 1);
|
1215
|
+
r[l] = b;
|
1078
1216
|
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1217
|
+
for (let i = l - 1; i >= 0; i--) {
|
1218
|
+
r[i] = f(self._array[i], r[i + 1]);
|
1219
|
+
}
|
1082
1220
|
|
1083
|
-
|
1221
|
+
return tsplus_module_2.asImmutableArray(r);
|
1222
|
+
};
|
1084
1223
|
}
|
1085
1224
|
/**
|
1086
|
-
* @tsplus
|
1225
|
+
* @tsplus pipeable fncts.ImmutableArray sort
|
1087
1226
|
*/
|
1088
1227
|
|
1089
|
-
function sort_1(
|
1228
|
+
function sort_1(
|
1090
1229
|
/** @tsplus auto */
|
1091
1230
|
O) {
|
1092
|
-
return
|
1231
|
+
return self => {
|
1232
|
+
return isEmpty_1(self) || tsplus_module_5.length(self) === 1 ? self : tsplus_module_2.asImmutableArray(self._array.slice().sort(O.compare));
|
1233
|
+
};
|
1093
1234
|
}
|
1094
1235
|
/**
|
1095
|
-
* @tsplus
|
1236
|
+
* @tsplus pipeable fncts.ImmutableArray sortBy
|
1096
1237
|
*/
|
1097
1238
|
|
1098
1239
|
|
1099
|
-
export function sortBy(
|
1100
|
-
return
|
1240
|
+
export function sortBy(Os) {
|
1241
|
+
return self => {
|
1242
|
+
return sort_1(fold_1(tsplus_module_15.getMonoid())(Os))(self);
|
1243
|
+
};
|
1101
1244
|
}
|
1102
|
-
export function
|
1103
|
-
|
1104
|
-
|
1245
|
+
export function spanLeft(p) {
|
1246
|
+
return self => {
|
1247
|
+
const i = spanIndexLeft_1(p)(self);
|
1248
|
+
const init = Array(i);
|
1105
1249
|
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1250
|
+
for (let j = 0; j < i; j++) {
|
1251
|
+
init[j] = self._array[j];
|
1252
|
+
}
|
1109
1253
|
|
1110
|
-
|
1111
|
-
|
1254
|
+
const l = tsplus_module_5.length(self);
|
1255
|
+
const rest = Array(l - i);
|
1112
1256
|
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1257
|
+
for (let j = i; j < l; j++) {
|
1258
|
+
rest[j - i] = self._array[j];
|
1259
|
+
}
|
1116
1260
|
|
1117
|
-
|
1261
|
+
return [tsplus_module_2.asImmutableArray(init), tsplus_module_2.asImmutableArray(rest)];
|
1262
|
+
};
|
1118
1263
|
}
|
1119
|
-
export function
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1264
|
+
export function spanRight(p) {
|
1265
|
+
return self => {
|
1266
|
+
const i = spanIndexRight_1(p)(self);
|
1267
|
+
const l = tsplus_module_5.length(self);
|
1268
|
+
const tail = Array(l - i - 1);
|
1123
1269
|
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1270
|
+
for (let j = l - 1; j > i; j--) {
|
1271
|
+
tail[j - i - 1] = self._array[j];
|
1272
|
+
}
|
1127
1273
|
|
1128
|
-
|
1274
|
+
const rest = Array(i);
|
1129
1275
|
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1276
|
+
for (let j = i; j >= 0; j--) {
|
1277
|
+
rest[j] = self._array[j];
|
1278
|
+
}
|
1133
1279
|
|
1134
|
-
|
1280
|
+
return [tsplus_module_2.asImmutableArray(rest), tsplus_module_2.asImmutableArray(tail)];
|
1281
|
+
};
|
1135
1282
|
}
|
1136
1283
|
/**
|
1137
|
-
* @tsplus
|
1284
|
+
* @tsplus pipeable fncts.ImmutableArray spanIndexLeft
|
1138
1285
|
*/
|
1139
1286
|
|
1140
|
-
function spanIndexLeft_1(
|
1141
|
-
|
1142
|
-
|
1287
|
+
function spanIndexLeft_1(p) {
|
1288
|
+
return self => {
|
1289
|
+
const l = tsplus_module_5.length(self);
|
1290
|
+
let i = 0;
|
1143
1291
|
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1292
|
+
for (; i < l; i++) {
|
1293
|
+
if (!p(self._array[i])) {
|
1294
|
+
break;
|
1295
|
+
}
|
1147
1296
|
}
|
1148
|
-
}
|
1149
1297
|
|
1150
|
-
|
1298
|
+
return i;
|
1299
|
+
};
|
1151
1300
|
}
|
1152
1301
|
/**
|
1153
|
-
* @tsplus
|
1302
|
+
* @tsplus pipeable fncts.ImmutableArray spanIndexRight
|
1154
1303
|
*/
|
1155
1304
|
|
1156
1305
|
|
1157
|
-
function spanIndexRight_1(
|
1158
|
-
|
1306
|
+
function spanIndexRight_1(predicate) {
|
1307
|
+
return as => {
|
1308
|
+
let i = tsplus_module_5.length(as) - 1;
|
1159
1309
|
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1310
|
+
for (; i >= 0; i--) {
|
1311
|
+
if (!predicate(as._array[i])) {
|
1312
|
+
break;
|
1313
|
+
}
|
1163
1314
|
}
|
1164
|
-
}
|
1165
1315
|
|
1166
|
-
|
1316
|
+
return i;
|
1317
|
+
};
|
1167
1318
|
}
|
1168
1319
|
/**
|
1169
1320
|
* @tsplus getter fncts.ImmutableArray tail
|
@@ -1171,84 +1322,96 @@ function spanIndexRight_1(as, predicate) {
|
|
1171
1322
|
|
1172
1323
|
|
1173
1324
|
export function tail(self) {
|
1174
|
-
return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just(tsplus_module_4.
|
1325
|
+
return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just(tsplus_module_4.slice(1)(self)) : tsplus_module_11.nothing();
|
1175
1326
|
}
|
1176
1327
|
/**
|
1177
|
-
* @tsplus
|
1328
|
+
* @tsplus pipeable fncts.ImmutableArray take
|
1178
1329
|
*/
|
1179
1330
|
|
1180
|
-
export function
|
1181
|
-
return
|
1331
|
+
export function take(n) {
|
1332
|
+
return self => {
|
1333
|
+
return tsplus_module_4.slice(0, n)(self);
|
1334
|
+
};
|
1182
1335
|
}
|
1183
1336
|
/**
|
1184
|
-
* @tsplus
|
1337
|
+
* @tsplus pipeable fncts.ImmutableArray takeLast
|
1185
1338
|
*/
|
1186
1339
|
|
1187
|
-
export function
|
1188
|
-
return
|
1340
|
+
export function takeLast(n) {
|
1341
|
+
return as => {
|
1342
|
+
return isEmpty_1(as) ? tsplus_module_2.empty() : tsplus_module_4.slice(-n)(as);
|
1343
|
+
};
|
1189
1344
|
}
|
1190
|
-
export function
|
1191
|
-
|
1192
|
-
|
1345
|
+
export function takeWhile(p) {
|
1346
|
+
return self => {
|
1347
|
+
const i = spanIndexLeft_1(p)(self);
|
1348
|
+
const init = Array(i);
|
1193
1349
|
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1350
|
+
for (let j = 0; j < i; j++) {
|
1351
|
+
init[j] = self._array[j];
|
1352
|
+
}
|
1197
1353
|
|
1198
|
-
|
1354
|
+
return tsplus_module_2.asImmutableArray(init);
|
1355
|
+
};
|
1199
1356
|
}
|
1200
|
-
/**
|
1201
|
-
* @tsplus getter fncts.ImmutableArray traverseWithIndex
|
1202
|
-
*/
|
1203
1357
|
|
1204
|
-
|
1205
|
-
|
1358
|
+
function _traverseWithIndex_1(self) {
|
1359
|
+
return G => f => foldLeftWithIndex_1(G.pure(tsplus_module_2.empty()), (i, fbs, a) => G.zipWith(f(i, a), (bs, b) => append_1(b)(bs))(fbs))(self);
|
1360
|
+
}
|
1206
1361
|
/**
|
1207
1362
|
* @tsplus getter fncts.ImmutableArray traverse
|
1208
1363
|
*/
|
1209
1364
|
|
1210
|
-
const traverse_1 = self => G => f => traverseWithIndex_1(self)(G)((_, a) => f(a));
|
1211
1365
|
|
1212
|
-
|
1366
|
+
function _traverse_1(self) {
|
1367
|
+
return G => f => _traverseWithIndex_1(self)(G)((_, a) => f(a));
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
export const traverseWithIndex = G => f => self => _traverseWithIndex_1(self)(G)(f);
|
1371
|
+
export const traverse = G => f => self => _traverseWithIndex_1(self)(G)((_, a) => f(a));
|
1213
1372
|
/**
|
1214
|
-
* @tsplus
|
1373
|
+
* @tsplus pipeable fncts.ImmutableArray union
|
1215
1374
|
*/
|
1216
1375
|
|
1217
|
-
export function
|
1376
|
+
export function union(that,
|
1218
1377
|
/** @tsplus auto */
|
1219
1378
|
E) {
|
1220
|
-
return
|
1379
|
+
return self => {
|
1380
|
+
return concat_1(filter_1(a => !elem_1(a, E)(self))(that))(self);
|
1381
|
+
};
|
1221
1382
|
}
|
1222
1383
|
/**
|
1223
|
-
* @tsplus
|
1384
|
+
* @tsplus pipeable fncts.ImmutableArray uniq
|
1224
1385
|
*/
|
1225
1386
|
|
1226
|
-
export function uniq(
|
1387
|
+
export function uniq(
|
1227
1388
|
/** @tsplus auto */
|
1228
1389
|
E) {
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1390
|
+
return self => {
|
1391
|
+
if (tsplus_module_5.length(self) === 1) {
|
1392
|
+
return self;
|
1393
|
+
}
|
1232
1394
|
|
1233
|
-
|
1234
|
-
|
1395
|
+
const out = [];
|
1396
|
+
const len = tsplus_module_5.length(self);
|
1235
1397
|
|
1236
|
-
|
1237
|
-
|
1398
|
+
for (let i = 0; i < len; i++) {
|
1399
|
+
const a = self._array[i];
|
1238
1400
|
|
1239
|
-
|
1240
|
-
|
1401
|
+
if (!elem_1(a, E)(tsplus_module_2.asImmutableArray(out))) {
|
1402
|
+
out.push(a);
|
1403
|
+
}
|
1241
1404
|
}
|
1242
|
-
}
|
1243
1405
|
|
1244
|
-
|
1406
|
+
return tsplus_module_2.asImmutableArray(out);
|
1407
|
+
};
|
1245
1408
|
}
|
1246
1409
|
/**
|
1247
1410
|
* @tsplus getter fncts.ImmutableArray unprepend
|
1248
1411
|
*/
|
1249
1412
|
|
1250
1413
|
export function unprepend(self) {
|
1251
|
-
return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just([unsafeGet_1(self, 0), tsplus_module_4.
|
1414
|
+
return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just([unsafeGet_1(self, 0), tsplus_module_4.slice(1)(self)]) : tsplus_module_11.nothing();
|
1252
1415
|
}
|
1253
1416
|
/**
|
1254
1417
|
* @tsplus index fncts.ImmutableArray
|
@@ -1266,54 +1429,62 @@ function unsafeAsMutable_1(self) {
|
|
1266
1429
|
return self._array;
|
1267
1430
|
}
|
1268
1431
|
/**
|
1269
|
-
* @tsplus
|
1432
|
+
* @tsplus pipeable fncts.ImmutableArray unsafeDeleteAt
|
1270
1433
|
*/
|
1271
1434
|
|
1272
1435
|
|
1273
|
-
function unsafeDeleteAt_1(
|
1274
|
-
return
|
1275
|
-
xs
|
1276
|
-
|
1436
|
+
function unsafeDeleteAt_1(i) {
|
1437
|
+
return self => {
|
1438
|
+
return mutate_1(xs => {
|
1439
|
+
xs.splice(i, 1);
|
1440
|
+
})(self);
|
1441
|
+
};
|
1277
1442
|
}
|
1278
1443
|
/**
|
1279
|
-
* @tsplus
|
1444
|
+
* @tsplus pipeable fncts.ImmutableArray unsafeInsertAt
|
1280
1445
|
*/
|
1281
1446
|
|
1282
1447
|
|
1283
|
-
function unsafeInsertAt_1(
|
1284
|
-
return
|
1285
|
-
xs
|
1286
|
-
|
1448
|
+
function unsafeInsertAt_1(i, a) {
|
1449
|
+
return as => {
|
1450
|
+
return mutate_1(xs => {
|
1451
|
+
xs.splice(i, 0, a);
|
1452
|
+
})(as);
|
1453
|
+
};
|
1287
1454
|
}
|
1288
1455
|
/**
|
1289
|
-
* @tsplus
|
1456
|
+
* @tsplus pipeable fncts.ImmutableArray unsafeModifyAt
|
1290
1457
|
*/
|
1291
1458
|
|
1292
1459
|
|
1293
|
-
function unsafeModifyAt_1(
|
1294
|
-
|
1460
|
+
function unsafeModifyAt_1(i, f) {
|
1461
|
+
return as => {
|
1462
|
+
const next = f(unsafeGet_1(as, i));
|
1295
1463
|
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1464
|
+
if (unsafeGet_1(as, i) === next) {
|
1465
|
+
return as;
|
1466
|
+
}
|
1299
1467
|
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1468
|
+
return mutate_1(xs => {
|
1469
|
+
xs[i] = next;
|
1470
|
+
})(as);
|
1471
|
+
};
|
1303
1472
|
}
|
1304
1473
|
/**
|
1305
|
-
* @tsplus
|
1474
|
+
* @tsplus pipeable fncts.ImmutableArray unsafeUpdateAt
|
1306
1475
|
*/
|
1307
1476
|
|
1308
1477
|
|
1309
|
-
function unsafeUpdateAt_1(
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
xs
|
1315
|
-
|
1316
|
-
|
1478
|
+
function unsafeUpdateAt_1(i, a) {
|
1479
|
+
return as => {
|
1480
|
+
if (unsafeGet_1(as, i) === a) {
|
1481
|
+
return as;
|
1482
|
+
} else {
|
1483
|
+
return mutate_1(xs => {
|
1484
|
+
xs[i] = a;
|
1485
|
+
})(as);
|
1486
|
+
}
|
1487
|
+
};
|
1317
1488
|
}
|
1318
1489
|
/**
|
1319
1490
|
* @tsplus getter fncts.ImmutableArray unzip
|
@@ -1332,67 +1503,83 @@ export function unzip(self) {
|
|
1332
1503
|
return [tsplus_module_2.asImmutableArray(fa), tsplus_module_2.asImmutableArray(fb)];
|
1333
1504
|
}
|
1334
1505
|
/**
|
1335
|
-
* @tsplus
|
1506
|
+
* @tsplus pipeable fncts.ImmutableArray updateAt
|
1336
1507
|
*/
|
1337
1508
|
|
1338
|
-
export function
|
1339
|
-
return
|
1509
|
+
export function updateAt(i, a) {
|
1510
|
+
return as => {
|
1511
|
+
return isOutOfBound_1(i)(as) ? tsplus_module_11.nothing() : tsplus_module_11.just(unsafeUpdateAt_1(i, a)(as));
|
1512
|
+
};
|
1340
1513
|
}
|
1341
1514
|
/**
|
1342
1515
|
* @tsplus getter fncts.ImmutableArray wiltWithIndex
|
1343
1516
|
*/
|
1344
1517
|
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1518
|
+
function _wiltWithIndex_1(self) {
|
1519
|
+
return G => f => G.map(([b1s, b2s]) => [tsplus_module_2.asImmutableArray(b1s), tsplus_module_2.asImmutableArray(b2s)])(foldLeftWithIndex_1(G.pure([[], []]), (i, fbs, a) => G.zipWith(fbs, (eb, r) => tsplus_module_16.match(b1 => {
|
1520
|
+
r[0].push(b1);
|
1521
|
+
return r;
|
1522
|
+
}, b2 => {
|
1523
|
+
r[1].push(b2);
|
1524
|
+
return r;
|
1525
|
+
})(eb))(f(i, a)))(self));
|
1526
|
+
}
|
1353
1527
|
/**
|
1354
1528
|
* @tsplus getter fncts.ImmutableArray wilt
|
1355
1529
|
*/
|
1356
1530
|
|
1357
|
-
|
1531
|
+
|
1532
|
+
export function _wilt(self) {
|
1533
|
+
return G => f => _wiltWithIndex_1(self)(G)((_, a) => f(a));
|
1534
|
+
}
|
1358
1535
|
/**
|
1359
1536
|
* @tsplus getter fncts.ImmutableArray witherWithIndex
|
1360
1537
|
*/
|
1361
1538
|
|
1362
|
-
|
1363
|
-
return G.map(foldLeftWithIndex_1(
|
1539
|
+
function _witherWithIndex_1(self) {
|
1540
|
+
return G => f => G.map(bs => tsplus_module_2.asImmutableArray(bs))(foldLeftWithIndex_1(G.pure([]), (i, b, a) => G.zipWith(b, (maybeB, bs) => {
|
1364
1541
|
if (tsplus_module_6.isJust(maybeB)) {
|
1365
1542
|
bs.push(maybeB.value);
|
1366
1543
|
}
|
1367
1544
|
|
1368
1545
|
return bs;
|
1369
|
-
})
|
1370
|
-
}
|
1371
|
-
export const witherWithIndex = witherWithIndex_1;
|
1546
|
+
})(f(i, a)))(self));
|
1547
|
+
}
|
1372
1548
|
/**
|
1373
1549
|
* @tsplus getter fncts.ImmutableArray wither
|
1374
1550
|
*/
|
1375
1551
|
|
1376
|
-
|
1552
|
+
|
1553
|
+
export function _wither(self) {
|
1554
|
+
return G => f => _witherWithIndex_1(self)(G)((_, a) => f(a));
|
1555
|
+
}
|
1556
|
+
export const wiltWithIndex = G => f => self => _wiltWithIndex_1(self)(G)(f);
|
1557
|
+
export const wilt = G => f => self => _wiltWithIndex_1(self)(G)((_, a) => f(a));
|
1558
|
+
export const witherWithIndex = G => f => self => _witherWithIndex_1(self)(G)(f);
|
1559
|
+
export const wither = G => f => self => _witherWithIndex_1(self)(G)((_, a) => f(a));
|
1377
1560
|
/**
|
1378
|
-
* @tsplus
|
1561
|
+
* @tsplus pipeable fncts.ImmutableArray zip
|
1379
1562
|
*/
|
1380
1563
|
|
1381
|
-
export function
|
1382
|
-
return
|
1564
|
+
export function zip(that) {
|
1565
|
+
return self => {
|
1566
|
+
return zipWith_1(that, tuple)(self);
|
1567
|
+
};
|
1383
1568
|
}
|
1384
1569
|
/**
|
1385
|
-
* @tsplus
|
1570
|
+
* @tsplus pipeable fncts.ImmutableArray zipWith
|
1386
1571
|
*/
|
1387
1572
|
|
1388
|
-
function zipWith_1(
|
1389
|
-
|
1390
|
-
|
1573
|
+
function zipWith_1(fb, f) {
|
1574
|
+
return self => {
|
1575
|
+
const len = Math.min(tsplus_module_5.length(self), tsplus_module_5.length(fb));
|
1576
|
+
const fc = Array(len);
|
1391
1577
|
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1578
|
+
for (let i = 0; i < len; i++) {
|
1579
|
+
fc[i] = f(self._array[i], fb._array[i]);
|
1580
|
+
}
|
1395
1581
|
|
1396
|
-
|
1582
|
+
return tsplus_module_2.asImmutableArray(fc);
|
1583
|
+
};
|
1397
1584
|
}
|
1398
1585
|
//# sourceMappingURL=api.mjs.map
|