@fncts/base 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_cjs/collection/Iterable/api/traverseConc.cjs +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/Encoder.cjs +32 -0
- 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/EnvironmentPatch.cjs +17 -13
- package/_cjs/data/EnvironmentPatch.cjs.map +1 -1
- 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/EnvironmentPatch.mjs +17 -13
- package/_mjs/data/EnvironmentPatch.mjs.map +1 -1
- 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/EnvironmentPatch.ts +10 -9
- 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 +1 -0
- package/_src/global/api.ts +7 -12
- package/_src/global.ts +4 -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/EnvironmentPatch.d.ts +4 -4
- 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 +1 -0
- package/global/api.d.ts +3 -3
- package/global.d.ts +4 -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
|
@@ -3,93 +3,96 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
6
|
+
exports._traverseWithIndex = exports._traverse = void 0;
|
|
7
|
+
exports._wilt = _wilt;
|
|
8
|
+
exports._wiltWithIndex = void 0;
|
|
9
|
+
exports._wither = _wither;
|
|
10
|
+
exports._witherWithIndex = void 0;
|
|
11
|
+
exports.align = align;
|
|
12
|
+
exports.alignWith = void 0;
|
|
13
|
+
exports.alt = alt;
|
|
14
|
+
exports.ap = ap;
|
|
15
|
+
exports.append = void 0;
|
|
11
16
|
exports.chainRecBreadthFirst = chainRecBreadthFirst;
|
|
12
17
|
exports.chainRecDepthFirst = chainRecDepthFirst;
|
|
13
18
|
exports.chop = void 0;
|
|
14
|
-
exports.
|
|
15
|
-
exports.chop_ = chop_;
|
|
16
|
-
exports.collectWhile_ = collectWhile_;
|
|
19
|
+
exports.collectWhile = collectWhile;
|
|
17
20
|
exports.comprehension = comprehension;
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
33
|
-
exports.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.fold = exports.flatten = exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
21
|
+
exports.concat = void 0;
|
|
22
|
+
exports.cross = cross;
|
|
23
|
+
exports.crossWith = void 0;
|
|
24
|
+
exports.deleteAt = deleteAt;
|
|
25
|
+
exports.difference = difference;
|
|
26
|
+
exports.drop = drop;
|
|
27
|
+
exports.dropLast = dropLast;
|
|
28
|
+
exports.dropLastWhile = dropLastWhile;
|
|
29
|
+
exports.dropWhile = dropWhile;
|
|
30
|
+
exports.elem = void 0;
|
|
31
|
+
exports.every = every;
|
|
32
|
+
exports.everyWithIndex = void 0;
|
|
33
|
+
exports.exists = exists;
|
|
34
|
+
exports.filter = void 0;
|
|
35
|
+
exports.filterMap = filterMap;
|
|
36
|
+
exports.filterWithIndex = exports.filterMapWithIndex = void 0;
|
|
37
|
+
exports.find = find;
|
|
38
|
+
exports.findIndex = findIndex;
|
|
39
|
+
exports.findLast = findLast;
|
|
40
|
+
exports.findLastIndex = findLastIndex;
|
|
41
|
+
exports.findLastMap = findLastMap;
|
|
42
|
+
exports.findLastMapWithIndex = void 0;
|
|
43
|
+
exports.findMap = findMap;
|
|
44
|
+
exports.foldLeft = exports.fold = exports.flatten = exports.flatMapWithIndex = exports.flatMap = exports.findWithIndex = exports.findMapWithIndex = void 0;
|
|
45
|
+
exports.foldLeftWhile = foldLeftWhile;
|
|
46
|
+
exports.foldLeftWithIndexWhile = exports.foldLeftWithIndex = void 0;
|
|
47
|
+
exports.foldMap = foldMap;
|
|
48
|
+
exports.foldMapWithIndex = void 0;
|
|
49
|
+
exports.foldRight = foldRight;
|
|
50
|
+
exports.foldRightWhile = foldRightWhile;
|
|
51
|
+
exports.get = exports.forEach = exports.foldRightWithIndexWhile = exports.foldRightWithIndex = void 0;
|
|
49
52
|
exports.group = group;
|
|
50
|
-
exports.
|
|
53
|
+
exports.groupBy = groupBy;
|
|
51
54
|
exports.head = head;
|
|
52
55
|
exports.init = init;
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
56
|
+
exports.insertAt = insertAt;
|
|
57
|
+
exports.intersection = intersection;
|
|
58
|
+
exports.intersperse = intersperse;
|
|
59
|
+
exports.isOutOfBound = exports.isEmpty = void 0;
|
|
57
60
|
exports.join = join;
|
|
58
61
|
exports.last = last;
|
|
59
62
|
exports.lefts = lefts;
|
|
60
63
|
exports.length = length;
|
|
61
|
-
exports.
|
|
62
|
-
exports.
|
|
63
|
-
exports.
|
|
64
|
-
exports.
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
-
exports.
|
|
68
|
-
exports.
|
|
64
|
+
exports.map = void 0;
|
|
65
|
+
exports.mapAccum = mapAccum;
|
|
66
|
+
exports.mapWithIndex = void 0;
|
|
67
|
+
exports.modifyAt = modifyAt;
|
|
68
|
+
exports.mutate = exports.mutableClone = void 0;
|
|
69
|
+
exports.partition = partition;
|
|
70
|
+
exports.partitionMap = partitionMap;
|
|
71
|
+
exports.prependAll = exports.prepend = exports.partitionWithIndex = exports.partitionMapWithIndex = void 0;
|
|
69
72
|
exports.reverse = reverse;
|
|
70
73
|
exports.rights = rights;
|
|
71
|
-
exports.
|
|
72
|
-
exports.
|
|
73
|
-
exports.
|
|
74
|
+
exports.rotate = void 0;
|
|
75
|
+
exports.scanLeft = scanLeft;
|
|
76
|
+
exports.scanRight = scanRight;
|
|
74
77
|
exports.sort = void 0;
|
|
75
78
|
exports.sortBy = sortBy;
|
|
76
|
-
exports.
|
|
77
|
-
exports.
|
|
78
|
-
exports.
|
|
79
|
+
exports.spanIndexRight = exports.spanIndexLeft = void 0;
|
|
80
|
+
exports.spanLeft = spanLeft;
|
|
81
|
+
exports.spanRight = spanRight;
|
|
79
82
|
exports.tail = tail;
|
|
80
|
-
exports.
|
|
81
|
-
exports.
|
|
82
|
-
exports.
|
|
83
|
-
exports.
|
|
84
|
-
exports.
|
|
83
|
+
exports.take = take;
|
|
84
|
+
exports.takeLast = takeLast;
|
|
85
|
+
exports.takeWhile = takeWhile;
|
|
86
|
+
exports.traverseWithIndex = exports.traverse = void 0;
|
|
87
|
+
exports.union = union;
|
|
85
88
|
exports.uniq = uniq;
|
|
86
89
|
exports.unprepend = unprepend;
|
|
87
|
-
exports.unsafeAsMutable = void 0;
|
|
88
|
-
exports.unsafeUpdateAt_ = exports.unsafeModifyAt_ = exports.unsafeInsertAt_ = exports.unsafeGet = exports.unsafeDeleteAt_ = void 0;
|
|
90
|
+
exports.unsafeUpdateAt = exports.unsafeModifyAt = exports.unsafeInsertAt = exports.unsafeGet = exports.unsafeDeleteAt = exports.unsafeAsMutable = void 0;
|
|
89
91
|
exports.unzip = unzip;
|
|
90
|
-
exports.
|
|
91
|
-
exports.
|
|
92
|
-
exports.
|
|
92
|
+
exports.updateAt = updateAt;
|
|
93
|
+
exports.witherWithIndex = exports.wither = exports.wiltWithIndex = exports.wilt = void 0;
|
|
94
|
+
exports.zip = zip;
|
|
95
|
+
exports.zipWith = void 0;
|
|
93
96
|
|
|
94
97
|
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/These/constructors"));
|
|
95
98
|
|
|
@@ -121,11 +124,7 @@ var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/requir
|
|
|
121
124
|
|
|
122
125
|
var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/typeclass/Ord/instances"));
|
|
123
126
|
|
|
124
|
-
var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
125
|
-
|
|
126
|
-
var tsplus_module_17 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Either/destructors"));
|
|
127
|
-
|
|
128
|
-
var tsplus_module_18 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/typeclass/WitherableWithIndex"));
|
|
127
|
+
var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Either/destructors"));
|
|
129
128
|
|
|
130
129
|
var _function = /*#__PURE__*/require("@fncts/base/data/function");
|
|
131
130
|
|
|
@@ -135,181 +134,205 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
135
134
|
|
|
136
135
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
137
136
|
|
|
138
|
-
const
|
|
139
|
-
exports.
|
|
140
|
-
const
|
|
141
|
-
exports.
|
|
142
|
-
const
|
|
143
|
-
exports.
|
|
144
|
-
const
|
|
145
|
-
exports.
|
|
146
|
-
const
|
|
147
|
-
exports.
|
|
137
|
+
const alignWith = alignWith_1;
|
|
138
|
+
exports.alignWith = alignWith;
|
|
139
|
+
const append = append_1;
|
|
140
|
+
exports.append = append;
|
|
141
|
+
const crossWith = crossWith_1;
|
|
142
|
+
exports.crossWith = crossWith;
|
|
143
|
+
const flatMapWithIndex = flatMapWithIndex_1;
|
|
144
|
+
exports.flatMapWithIndex = flatMapWithIndex;
|
|
145
|
+
const flatMap = flatMap_1;
|
|
146
|
+
exports.flatMap = flatMap;
|
|
148
147
|
const flatten = flatten_1;
|
|
149
148
|
exports.flatten = flatten;
|
|
150
|
-
const
|
|
151
|
-
exports.
|
|
152
|
-
const
|
|
153
|
-
exports.
|
|
154
|
-
const
|
|
155
|
-
exports.
|
|
156
|
-
const
|
|
157
|
-
exports.
|
|
158
|
-
const
|
|
159
|
-
exports.
|
|
160
|
-
const
|
|
161
|
-
exports.
|
|
162
|
-
const
|
|
163
|
-
exports.
|
|
164
|
-
const
|
|
165
|
-
exports.
|
|
166
|
-
const
|
|
167
|
-
exports.
|
|
168
|
-
const
|
|
169
|
-
exports.
|
|
170
|
-
const
|
|
171
|
-
exports.
|
|
172
|
-
const
|
|
173
|
-
exports.
|
|
149
|
+
const chop = chop_1;
|
|
150
|
+
exports.chop = chop;
|
|
151
|
+
const concat = concat_1;
|
|
152
|
+
exports.concat = concat;
|
|
153
|
+
const elem = elem_1;
|
|
154
|
+
exports.elem = elem;
|
|
155
|
+
const everyWithIndex = everyWithIndex_1;
|
|
156
|
+
exports.everyWithIndex = everyWithIndex;
|
|
157
|
+
const filter = filter_1;
|
|
158
|
+
exports.filter = filter;
|
|
159
|
+
const filterWithIndex = filterWithIndex_1;
|
|
160
|
+
exports.filterWithIndex = filterWithIndex;
|
|
161
|
+
const filterMapWithIndex = filterMapWithIndex_1;
|
|
162
|
+
exports.filterMapWithIndex = filterMapWithIndex;
|
|
163
|
+
const findWithIndex = findWithIndex_1;
|
|
164
|
+
exports.findWithIndex = findWithIndex;
|
|
165
|
+
const findMapWithIndex = findMapWithIndex_1;
|
|
166
|
+
exports.findMapWithIndex = findMapWithIndex;
|
|
167
|
+
const findLastMapWithIndex = findLastMapWithIndex_1;
|
|
168
|
+
exports.findLastMapWithIndex = findLastMapWithIndex;
|
|
169
|
+
const foldLeftWithIndex = foldLeftWithIndex_1;
|
|
170
|
+
exports.foldLeftWithIndex = foldLeftWithIndex;
|
|
171
|
+
const foldLeft = foldLeft_1;
|
|
172
|
+
exports.foldLeft = foldLeft;
|
|
173
|
+
const foldLeftWithIndexWhile = foldLeftWithIndexWhile_1;
|
|
174
|
+
exports.foldLeftWithIndexWhile = foldLeftWithIndexWhile;
|
|
174
175
|
const fold = fold_1;
|
|
175
176
|
exports.fold = fold;
|
|
176
|
-
const
|
|
177
|
-
exports.
|
|
178
|
-
const
|
|
179
|
-
exports.
|
|
180
|
-
const
|
|
181
|
-
exports.
|
|
182
|
-
const
|
|
183
|
-
exports.
|
|
184
|
-
const
|
|
185
|
-
exports.
|
|
177
|
+
const foldMapWithIndex = foldMapWithIndex_1;
|
|
178
|
+
exports.foldMapWithIndex = foldMapWithIndex;
|
|
179
|
+
const foldRightWithIndex = foldRightWithIndex_1;
|
|
180
|
+
exports.foldRightWithIndex = foldRightWithIndex;
|
|
181
|
+
const foldRightWithIndexWhile = foldRightWithIndexWhile_1;
|
|
182
|
+
exports.foldRightWithIndexWhile = foldRightWithIndexWhile;
|
|
183
|
+
const forEach = forEach_1;
|
|
184
|
+
exports.forEach = forEach;
|
|
185
|
+
const get = get_1;
|
|
186
|
+
exports.get = get;
|
|
186
187
|
const isEmpty = isEmpty_1;
|
|
187
188
|
exports.isEmpty = isEmpty;
|
|
188
|
-
const
|
|
189
|
-
exports.
|
|
190
|
-
const
|
|
191
|
-
exports.
|
|
192
|
-
const
|
|
193
|
-
exports.
|
|
194
|
-
const
|
|
195
|
-
exports.
|
|
189
|
+
const isOutOfBound = isOutOfBound_1;
|
|
190
|
+
exports.isOutOfBound = isOutOfBound;
|
|
191
|
+
const map = map_1;
|
|
192
|
+
exports.map = map;
|
|
193
|
+
const mapWithIndex = mapWithIndex_1;
|
|
194
|
+
exports.mapWithIndex = mapWithIndex;
|
|
195
|
+
const mutate = mutate_1;
|
|
196
|
+
exports.mutate = mutate;
|
|
196
197
|
const mutableClone = mutableClone_1;
|
|
197
198
|
exports.mutableClone = mutableClone;
|
|
198
|
-
const
|
|
199
|
-
exports.
|
|
200
|
-
const
|
|
201
|
-
exports.
|
|
202
|
-
const
|
|
203
|
-
exports.
|
|
204
|
-
const
|
|
205
|
-
exports.
|
|
206
|
-
const
|
|
207
|
-
exports.
|
|
199
|
+
const partitionWithIndex = partitionWithIndex_1;
|
|
200
|
+
exports.partitionWithIndex = partitionWithIndex;
|
|
201
|
+
const partitionMapWithIndex = partitionMapWithIndex_1;
|
|
202
|
+
exports.partitionMapWithIndex = partitionMapWithIndex;
|
|
203
|
+
const prepend = prepend_1;
|
|
204
|
+
exports.prepend = prepend;
|
|
205
|
+
const prependAll = prependAll_1;
|
|
206
|
+
exports.prependAll = prependAll;
|
|
207
|
+
const rotate = rotate_1;
|
|
208
|
+
exports.rotate = rotate;
|
|
208
209
|
const sort = sort_1;
|
|
209
210
|
exports.sort = sort;
|
|
210
|
-
const
|
|
211
|
-
exports.
|
|
212
|
-
const
|
|
213
|
-
exports.
|
|
211
|
+
const spanIndexLeft = spanIndexLeft_1;
|
|
212
|
+
exports.spanIndexLeft = spanIndexLeft;
|
|
213
|
+
const spanIndexRight = spanIndexRight_1;
|
|
214
|
+
exports.spanIndexRight = spanIndexRight;
|
|
215
|
+
const _traverseWithIndex = _traverseWithIndex_1;
|
|
216
|
+
exports._traverseWithIndex = _traverseWithIndex;
|
|
217
|
+
const _traverse = _traverse_1;
|
|
218
|
+
exports._traverse = _traverse;
|
|
214
219
|
const unsafeGet = unsafeGet_1;
|
|
215
220
|
exports.unsafeGet = unsafeGet;
|
|
216
221
|
const unsafeAsMutable = unsafeAsMutable_1;
|
|
217
222
|
exports.unsafeAsMutable = unsafeAsMutable;
|
|
218
|
-
const
|
|
219
|
-
exports.
|
|
220
|
-
const
|
|
221
|
-
exports.
|
|
222
|
-
const
|
|
223
|
-
exports.
|
|
224
|
-
const
|
|
225
|
-
exports.
|
|
226
|
-
const
|
|
227
|
-
exports.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
for (let i = minlen; i < maxlen; i++) {
|
|
247
|
-
ret[i] = f(tsplus_module_1.left(selfArray[i]));
|
|
223
|
+
const unsafeDeleteAt = unsafeDeleteAt_1;
|
|
224
|
+
exports.unsafeDeleteAt = unsafeDeleteAt;
|
|
225
|
+
const unsafeInsertAt = unsafeInsertAt_1;
|
|
226
|
+
exports.unsafeInsertAt = unsafeInsertAt;
|
|
227
|
+
const unsafeModifyAt = unsafeModifyAt_1;
|
|
228
|
+
exports.unsafeModifyAt = unsafeModifyAt;
|
|
229
|
+
const unsafeUpdateAt = unsafeUpdateAt_1;
|
|
230
|
+
exports.unsafeUpdateAt = unsafeUpdateAt;
|
|
231
|
+
const _wiltWithIndex = _wiltWithIndex_1;
|
|
232
|
+
exports._wiltWithIndex = _wiltWithIndex;
|
|
233
|
+
const _witherWithIndex = _witherWithIndex_1;
|
|
234
|
+
exports._witherWithIndex = _witherWithIndex;
|
|
235
|
+
const zipWith = zipWith_1;
|
|
236
|
+
exports.zipWith = zipWith;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @tsplus pipeable fncts.ImmutableArray alignWith
|
|
240
|
+
*/
|
|
241
|
+
function alignWith_1(fb, f) {
|
|
242
|
+
return self => {
|
|
243
|
+
const selfArray = self._array;
|
|
244
|
+
const thatArray = fb._array;
|
|
245
|
+
const minlen = Math.min(selfArray.length, thatArray.length);
|
|
246
|
+
const maxlen = Math.max(selfArray.length, thatArray.length);
|
|
247
|
+
const ret = Array(maxlen);
|
|
248
|
+
|
|
249
|
+
for (let i = 0; i < minlen; i++) {
|
|
250
|
+
ret[i] = f(tsplus_module_1.both(selfArray[i], thatArray[i]));
|
|
248
251
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
+
|
|
253
|
+
if (minlen === maxlen) {
|
|
254
|
+
return tsplus_module_2.asImmutableArray(ret);
|
|
255
|
+
} else if (selfArray.length > thatArray.length) {
|
|
256
|
+
for (let i = minlen; i < maxlen; i++) {
|
|
257
|
+
ret[i] = f(tsplus_module_1.left(selfArray[i]));
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
for (let i = minlen; i < maxlen; i++) {
|
|
261
|
+
ret[i] = f(tsplus_module_1.right(thatArray[i]));
|
|
262
|
+
}
|
|
252
263
|
}
|
|
253
|
-
}
|
|
254
264
|
|
|
255
|
-
|
|
265
|
+
return tsplus_module_2.asImmutableArray(ret);
|
|
266
|
+
};
|
|
256
267
|
}
|
|
257
268
|
/**
|
|
258
|
-
* @tsplus
|
|
269
|
+
* @tsplus pipeable fncts.ImmutableArray align
|
|
259
270
|
*/
|
|
260
271
|
|
|
261
272
|
|
|
262
|
-
function
|
|
263
|
-
return
|
|
273
|
+
function align(fb) {
|
|
274
|
+
return self => {
|
|
275
|
+
return alignWith_1(fb, _function.identity)(self);
|
|
276
|
+
};
|
|
264
277
|
}
|
|
265
278
|
/**
|
|
266
|
-
* @tsplus
|
|
279
|
+
* @tsplus pipeable fncts.ImmutableArray alt
|
|
267
280
|
*/
|
|
268
281
|
|
|
269
282
|
|
|
270
|
-
function
|
|
271
|
-
return
|
|
283
|
+
function alt(that) {
|
|
284
|
+
return self => {
|
|
285
|
+
return concat_1(that())(self);
|
|
286
|
+
};
|
|
272
287
|
}
|
|
273
288
|
/**
|
|
274
|
-
* @tsplus
|
|
289
|
+
* @tsplus pipeable fncts.ImmutableArray ap
|
|
275
290
|
*/
|
|
276
291
|
|
|
277
292
|
|
|
278
|
-
function
|
|
279
|
-
return
|
|
293
|
+
function ap(fa) {
|
|
294
|
+
return self => {
|
|
295
|
+
return flatMap_1(f => map_1(f)(fa))(self);
|
|
296
|
+
};
|
|
280
297
|
}
|
|
281
298
|
/**
|
|
282
|
-
* @tsplus
|
|
299
|
+
* @tsplus pipeable fncts.ImmutableArray append
|
|
283
300
|
*/
|
|
284
301
|
|
|
285
302
|
|
|
286
|
-
function append_1(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
303
|
+
function append_1(last) {
|
|
304
|
+
return self => {
|
|
305
|
+
const selfArray = self._array;
|
|
306
|
+
const len = selfArray.length;
|
|
307
|
+
const r = Array(len + 1);
|
|
308
|
+
r[len] = last;
|
|
291
309
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
310
|
+
for (let i = 0; i < len; i++) {
|
|
311
|
+
r[i] = selfArray[i];
|
|
312
|
+
}
|
|
295
313
|
|
|
296
|
-
|
|
314
|
+
return tsplus_module_2.asImmutableArray(r);
|
|
315
|
+
};
|
|
297
316
|
}
|
|
298
317
|
/**
|
|
299
|
-
* @tsplus
|
|
318
|
+
* @tsplus pipeable fncts.ImmutableArray crossWith
|
|
300
319
|
*/
|
|
301
320
|
|
|
302
321
|
|
|
303
|
-
function crossWith_1(
|
|
304
|
-
return
|
|
322
|
+
function crossWith_1(fb, f) {
|
|
323
|
+
return self => {
|
|
324
|
+
return flatMap_1(a => map_1(b => f(a, b))(fb))(self);
|
|
325
|
+
};
|
|
305
326
|
}
|
|
306
327
|
/**
|
|
307
|
-
* @tsplus
|
|
328
|
+
* @tsplus pipeable fncts.ImmutableArray cross
|
|
308
329
|
*/
|
|
309
330
|
|
|
310
331
|
|
|
311
|
-
function
|
|
312
|
-
return
|
|
332
|
+
function cross(fb) {
|
|
333
|
+
return self => {
|
|
334
|
+
return crossWith_1(fb, (a, b) => tsplus_module_3.make(a, b))(self);
|
|
335
|
+
};
|
|
313
336
|
}
|
|
314
337
|
/**
|
|
315
338
|
* @tsplus static fncts.ImmutableArrayOps chainRecDepthFirst
|
|
@@ -317,7 +340,7 @@ function cross_(self, fb) {
|
|
|
317
340
|
|
|
318
341
|
|
|
319
342
|
function chainRecDepthFirst(a, f) {
|
|
320
|
-
const buffer = unsafeAsMutable_1(tsplus_module_4.
|
|
343
|
+
const buffer = unsafeAsMutable_1(tsplus_module_4.slice()(f(a)));
|
|
321
344
|
const out = [];
|
|
322
345
|
|
|
323
346
|
while (buffer.length > 0) {
|
|
@@ -349,7 +372,7 @@ function chainRecBreadthFirst(a, f) {
|
|
|
349
372
|
void 0;
|
|
350
373
|
|
|
351
374
|
if (e._tag === "Left") {
|
|
352
|
-
forEach_1(
|
|
375
|
+
forEach_1(v => buffer.push(v))(f(e.left));
|
|
353
376
|
} else {
|
|
354
377
|
out.push(e.right);
|
|
355
378
|
}
|
|
@@ -366,48 +389,52 @@ function chainRecBreadthFirst(a, f) {
|
|
|
366
389
|
return tsplus_module_2.asImmutableArray(out);
|
|
367
390
|
}
|
|
368
391
|
/**
|
|
369
|
-
* @tsplus
|
|
392
|
+
* @tsplus pipeable fncts.ImmutableArray flatMapWithIndex
|
|
370
393
|
*/
|
|
371
394
|
|
|
372
395
|
|
|
373
|
-
function flatMapWithIndex_1(
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
396
|
+
function flatMapWithIndex_1(f) {
|
|
397
|
+
return self => {
|
|
398
|
+
let outLen = 0;
|
|
399
|
+
const selfArray = self._array;
|
|
400
|
+
const len = selfArray.length;
|
|
401
|
+
const temp = Array(len);
|
|
378
402
|
|
|
379
|
-
|
|
380
|
-
|
|
403
|
+
for (let i = 0; i < len; i++) {
|
|
404
|
+
const e = selfArray[i];
|
|
381
405
|
|
|
382
|
-
|
|
406
|
+
const arr = f(i, e)._array;
|
|
383
407
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
408
|
+
outLen += arr.length;
|
|
409
|
+
temp[i] = arr;
|
|
410
|
+
}
|
|
387
411
|
|
|
388
|
-
|
|
389
|
-
|
|
412
|
+
const out = Array(outLen);
|
|
413
|
+
let start = 0;
|
|
390
414
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
415
|
+
for (let i = 0; i < len; i++) {
|
|
416
|
+
const arr = temp[i];
|
|
417
|
+
const l = arr.length;
|
|
394
418
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
419
|
+
for (let j = 0; j < l; j++) {
|
|
420
|
+
out[j + start] = arr[j];
|
|
421
|
+
}
|
|
398
422
|
|
|
399
|
-
|
|
400
|
-
|
|
423
|
+
start += l;
|
|
424
|
+
}
|
|
401
425
|
|
|
402
|
-
|
|
426
|
+
return tsplus_module_2.asImmutableArray(out);
|
|
427
|
+
};
|
|
403
428
|
}
|
|
404
429
|
/**
|
|
405
|
-
* @tsplus
|
|
430
|
+
* @tsplus pipeable fncts.ImmutableArray flatMap
|
|
406
431
|
*/
|
|
407
432
|
|
|
408
433
|
|
|
409
|
-
function flatMap_1(
|
|
410
|
-
return
|
|
434
|
+
function flatMap_1(f) {
|
|
435
|
+
return self => {
|
|
436
|
+
return flatMapWithIndex_1((_, a) => f(a))(self);
|
|
437
|
+
};
|
|
411
438
|
}
|
|
412
439
|
/**
|
|
413
440
|
* @tsplus getter fncts.ImmutableArray flatten
|
|
@@ -415,59 +442,59 @@ function flatMap_1(self, f) {
|
|
|
415
442
|
|
|
416
443
|
|
|
417
444
|
function flatten_1(self) {
|
|
418
|
-
return flatMap_1(
|
|
445
|
+
return flatMap_1(_function.identity)(self);
|
|
419
446
|
}
|
|
420
447
|
/**
|
|
421
448
|
* A useful recursion pattern for processing a `Array` to produce a new `Array`,
|
|
422
449
|
* often used for "chopping" up the input `Array`. Typically chop is called with some function
|
|
423
450
|
* that will consume an initial prefix of the `Array` and produce a value and the rest of the `Array`.
|
|
424
451
|
*
|
|
425
|
-
* @tsplus
|
|
452
|
+
* @tsplus pipeable fncts.ImmutableArray chop
|
|
426
453
|
*/
|
|
427
454
|
|
|
428
455
|
|
|
429
|
-
function
|
|
430
|
-
|
|
431
|
-
|
|
456
|
+
function chop_1(f) {
|
|
457
|
+
return as => {
|
|
458
|
+
const result = [];
|
|
459
|
+
let cs = as;
|
|
432
460
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
461
|
+
while (tsplus_module_5.isNonEmpty(cs)) {
|
|
462
|
+
const [b, c] = f(cs);
|
|
463
|
+
result.push(b);
|
|
464
|
+
cs = c;
|
|
465
|
+
}
|
|
438
466
|
|
|
439
|
-
|
|
467
|
+
return tsplus_module_2.asImmutableArray(result);
|
|
468
|
+
};
|
|
440
469
|
}
|
|
441
|
-
|
|
442
|
-
const chop = f => as => chop_(as, f);
|
|
443
470
|
/**
|
|
444
|
-
* @tsplus
|
|
471
|
+
* @tsplus pipeable fncts.ImmutableArray collectWhile
|
|
445
472
|
*/
|
|
446
473
|
|
|
447
474
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
const result = [];
|
|
475
|
+
function collectWhile(f) {
|
|
476
|
+
return as => {
|
|
477
|
+
const result = [];
|
|
452
478
|
|
|
453
|
-
|
|
454
|
-
|
|
479
|
+
for (let i = 0; i < tsplus_module_5.length(as); i++) {
|
|
480
|
+
const o = f(as._array[i]);
|
|
455
481
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
482
|
+
if (tsplus_module_6.isJust(o)) {
|
|
483
|
+
result.push(o.value);
|
|
484
|
+
} else {
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
460
487
|
}
|
|
461
|
-
}
|
|
462
488
|
|
|
463
|
-
|
|
489
|
+
return tsplus_module_2.asImmutableArray(result);
|
|
490
|
+
};
|
|
464
491
|
}
|
|
465
492
|
|
|
466
493
|
function comprehensionLoop(scope, input, f, g) {
|
|
467
494
|
if (input.length === 0) {
|
|
468
495
|
return g(...scope) ? tsplus_module_7.now(tsplus_module_2.make(f(...scope))) : tsplus_module_7.now(tsplus_module_2.empty());
|
|
469
496
|
} else {
|
|
470
|
-
return tsplus_module_9.
|
|
497
|
+
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)));
|
|
471
498
|
}
|
|
472
499
|
}
|
|
473
500
|
|
|
@@ -475,429 +502,507 @@ function comprehension(input, f, g = () => true) {
|
|
|
475
502
|
return tsplus_module_10.run(comprehensionLoop(tsplus_module_2.empty(), input, f, g));
|
|
476
503
|
}
|
|
477
504
|
/**
|
|
478
|
-
* @tsplus
|
|
479
|
-
* @tsplus operator fncts.ImmutableArray +
|
|
505
|
+
* @tsplus pipeable fncts.ImmutableArray concat
|
|
506
|
+
* @tsplus pipeable-operator fncts.ImmutableArray +
|
|
480
507
|
*/
|
|
481
508
|
|
|
482
509
|
|
|
483
|
-
function concat_1(
|
|
484
|
-
|
|
510
|
+
function concat_1(that) {
|
|
511
|
+
return self => {
|
|
512
|
+
const lenx = self._array.length;
|
|
485
513
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
514
|
+
if (lenx === 0) {
|
|
515
|
+
return that;
|
|
516
|
+
}
|
|
489
517
|
|
|
490
|
-
|
|
518
|
+
const leny = that._array.length;
|
|
491
519
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
520
|
+
if (leny === 0) {
|
|
521
|
+
return self;
|
|
522
|
+
}
|
|
495
523
|
|
|
496
|
-
|
|
524
|
+
const r = Array(lenx + leny);
|
|
497
525
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
526
|
+
for (let i = 0; i < lenx; i++) {
|
|
527
|
+
r[i] = self._array[i];
|
|
528
|
+
}
|
|
501
529
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
530
|
+
for (let i = 0; i < leny; i++) {
|
|
531
|
+
r[i + lenx] = that._array[i];
|
|
532
|
+
}
|
|
505
533
|
|
|
506
|
-
|
|
534
|
+
return tsplus_module_2.asImmutableArray(r);
|
|
535
|
+
};
|
|
507
536
|
}
|
|
508
537
|
/**
|
|
509
|
-
* @tsplus
|
|
538
|
+
* @tsplus pipeable fncts.ImmutableArray deleteAt
|
|
510
539
|
*/
|
|
511
540
|
|
|
512
541
|
|
|
513
|
-
function
|
|
514
|
-
return
|
|
542
|
+
function deleteAt(i) {
|
|
543
|
+
return as => {
|
|
544
|
+
return isOutOfBound_1(i)(as) ? tsplus_module_11.nothing() : tsplus_module_11.just(unsafeDeleteAt_1(i)(as));
|
|
545
|
+
};
|
|
515
546
|
}
|
|
516
547
|
/**
|
|
517
|
-
* @tsplus
|
|
548
|
+
* @tsplus pipeable fncts.ImmutableArray difference
|
|
518
549
|
*/
|
|
519
550
|
|
|
520
551
|
|
|
521
|
-
function
|
|
552
|
+
function difference(ys,
|
|
522
553
|
/** @tsplus auto */
|
|
523
554
|
E) {
|
|
524
|
-
return
|
|
555
|
+
return self => {
|
|
556
|
+
return filter_1(a => !elem_1(a, E)(ys))(self);
|
|
557
|
+
};
|
|
525
558
|
}
|
|
526
559
|
/**
|
|
527
|
-
* @tsplus
|
|
560
|
+
* @tsplus pipeable fncts.ImmutableArray drop
|
|
528
561
|
*/
|
|
529
562
|
|
|
530
563
|
|
|
531
|
-
function
|
|
532
|
-
return
|
|
564
|
+
function drop(n) {
|
|
565
|
+
return self => {
|
|
566
|
+
return tsplus_module_4.slice(n)(self);
|
|
567
|
+
};
|
|
533
568
|
}
|
|
534
569
|
/**
|
|
535
|
-
* @tsplus
|
|
570
|
+
* @tsplus pipeable fncts.ImmutableArray dropLast
|
|
536
571
|
*/
|
|
537
572
|
|
|
538
573
|
|
|
539
|
-
function
|
|
540
|
-
return
|
|
574
|
+
function dropLast(n) {
|
|
575
|
+
return self => {
|
|
576
|
+
return tsplus_module_4.slice(0, tsplus_module_5.length(self) - n)(self);
|
|
577
|
+
};
|
|
541
578
|
}
|
|
542
579
|
/**
|
|
543
|
-
* @tsplus
|
|
580
|
+
* @tsplus pipeable fncts.ImmutableArray dropWhile
|
|
544
581
|
*/
|
|
545
582
|
|
|
546
583
|
|
|
547
|
-
function
|
|
548
|
-
return
|
|
584
|
+
function dropWhile(p) {
|
|
585
|
+
return self => {
|
|
586
|
+
return tsplus_module_4.slice(spanIndexLeft_1(p)(self))(self);
|
|
587
|
+
};
|
|
549
588
|
}
|
|
550
589
|
/**
|
|
551
|
-
* @tsplus
|
|
590
|
+
* @tsplus pipeable fncts.ImmutableArray dropLastWhile
|
|
552
591
|
*/
|
|
553
592
|
|
|
554
593
|
|
|
555
|
-
function
|
|
556
|
-
return
|
|
594
|
+
function dropLastWhile(p) {
|
|
595
|
+
return as => {
|
|
596
|
+
return tsplus_module_4.slice(0, spanIndexRight_1(p)(as) + 1)(as);
|
|
597
|
+
};
|
|
557
598
|
}
|
|
558
599
|
/**
|
|
559
600
|
* Test if a value is a member of an array. Takes an `Eq<A>` as a single
|
|
560
601
|
* argument which returns the function to use to search for a value of type `A` in
|
|
561
602
|
* an array of type `ImmutableArray<A>`.
|
|
562
603
|
*
|
|
563
|
-
* @tsplus
|
|
604
|
+
* @tsplus pipeable fncts.ImmutableArray elem
|
|
564
605
|
*/
|
|
565
606
|
|
|
566
607
|
|
|
567
|
-
function elem_1(
|
|
608
|
+
function elem_1(a,
|
|
568
609
|
/** @tsplus auto */
|
|
569
610
|
E) {
|
|
570
|
-
|
|
611
|
+
return as => {
|
|
612
|
+
const predicate = element => E.equals(element, a);
|
|
571
613
|
|
|
572
|
-
|
|
614
|
+
const len = tsplus_module_5.length(as);
|
|
573
615
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
616
|
+
for (let i = 0; i < len; i++) {
|
|
617
|
+
if (predicate(as._array[i])) {
|
|
618
|
+
return true;
|
|
619
|
+
}
|
|
577
620
|
}
|
|
578
|
-
}
|
|
579
621
|
|
|
580
|
-
|
|
622
|
+
return false;
|
|
623
|
+
};
|
|
581
624
|
}
|
|
582
625
|
|
|
583
|
-
function
|
|
584
|
-
return
|
|
626
|
+
function every(p) {
|
|
627
|
+
return self => {
|
|
628
|
+
return everyWithIndex_1((_, a) => p(a))(self);
|
|
629
|
+
};
|
|
585
630
|
}
|
|
586
631
|
|
|
587
|
-
function everyWithIndex_1(
|
|
588
|
-
|
|
589
|
-
|
|
632
|
+
function everyWithIndex_1(p) {
|
|
633
|
+
return self => {
|
|
634
|
+
let result = true;
|
|
635
|
+
let i = 0;
|
|
590
636
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
637
|
+
while (result && i < tsplus_module_5.length(self)) {
|
|
638
|
+
result = p(i, self._array[i]);
|
|
639
|
+
i++;
|
|
640
|
+
}
|
|
595
641
|
|
|
596
|
-
|
|
642
|
+
return result;
|
|
643
|
+
};
|
|
597
644
|
}
|
|
598
645
|
/**
|
|
599
|
-
* @tsplus
|
|
646
|
+
* @tsplus pipeable fncts.ImmutableArray exists
|
|
600
647
|
*/
|
|
601
648
|
|
|
602
649
|
|
|
603
|
-
function
|
|
604
|
-
|
|
605
|
-
|
|
650
|
+
function exists(p) {
|
|
651
|
+
return self => {
|
|
652
|
+
let result = false;
|
|
653
|
+
let i = 0;
|
|
606
654
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
655
|
+
while (!result && i < tsplus_module_5.length(self)) {
|
|
656
|
+
result = p(self._array[i]);
|
|
657
|
+
i++;
|
|
658
|
+
}
|
|
611
659
|
|
|
612
|
-
|
|
660
|
+
return result;
|
|
661
|
+
};
|
|
613
662
|
}
|
|
614
663
|
|
|
615
|
-
function filter_1(
|
|
616
|
-
return
|
|
664
|
+
function filter_1(p) {
|
|
665
|
+
return self => {
|
|
666
|
+
return filterWithIndex_1((_, a) => p(a))(self);
|
|
667
|
+
};
|
|
617
668
|
}
|
|
618
669
|
|
|
619
|
-
function filterWithIndex_1(
|
|
620
|
-
|
|
670
|
+
function filterWithIndex_1(p) {
|
|
671
|
+
return self => {
|
|
672
|
+
const result = [];
|
|
621
673
|
|
|
622
|
-
|
|
623
|
-
|
|
674
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
|
675
|
+
const a = self._array[i];
|
|
624
676
|
|
|
625
|
-
|
|
626
|
-
|
|
677
|
+
if (p(i, a)) {
|
|
678
|
+
result.push(a);
|
|
679
|
+
}
|
|
627
680
|
}
|
|
628
|
-
}
|
|
629
681
|
|
|
630
|
-
|
|
682
|
+
return tsplus_module_2.asImmutableArray(result);
|
|
683
|
+
};
|
|
631
684
|
}
|
|
632
685
|
/**
|
|
633
|
-
* @tsplus
|
|
686
|
+
* @tsplus pipeable fncts.ImmutableArray filterMapWithIndex
|
|
634
687
|
*/
|
|
635
688
|
|
|
636
689
|
|
|
637
|
-
function filterMapWithIndex_1(
|
|
638
|
-
|
|
690
|
+
function filterMapWithIndex_1(f) {
|
|
691
|
+
return fa => {
|
|
692
|
+
const result = [];
|
|
639
693
|
|
|
640
|
-
|
|
641
|
-
|
|
694
|
+
for (let i = 0; i < tsplus_module_5.length(fa); i++) {
|
|
695
|
+
const maybeB = f(i, unsafeGet_1(fa, i));
|
|
642
696
|
|
|
643
|
-
|
|
644
|
-
|
|
697
|
+
if (tsplus_module_6.isJust(maybeB)) {
|
|
698
|
+
result.push(maybeB.value);
|
|
699
|
+
}
|
|
645
700
|
}
|
|
646
|
-
}
|
|
647
701
|
|
|
648
|
-
|
|
702
|
+
return tsplus_module_2.asImmutableArray(result);
|
|
703
|
+
};
|
|
649
704
|
}
|
|
650
705
|
/**
|
|
651
|
-
* @tsplus
|
|
706
|
+
* @tsplus pipeable fncts.ImmutableArray filterMap
|
|
652
707
|
*/
|
|
653
708
|
|
|
654
709
|
|
|
655
|
-
function
|
|
656
|
-
return
|
|
710
|
+
function filterMap(f) {
|
|
711
|
+
return self => {
|
|
712
|
+
return filterMapWithIndex_1((_, a) => f(a))(self);
|
|
713
|
+
};
|
|
657
714
|
}
|
|
658
715
|
|
|
659
|
-
function
|
|
660
|
-
return
|
|
716
|
+
function find(p) {
|
|
717
|
+
return self => {
|
|
718
|
+
return findWithIndex_1((_, a) => p(a))(self);
|
|
719
|
+
};
|
|
661
720
|
}
|
|
662
721
|
/**
|
|
663
|
-
* @tsplus
|
|
722
|
+
* @tsplus pipeable fncts.ImmutableArray findIndex
|
|
664
723
|
*/
|
|
665
724
|
|
|
666
725
|
|
|
667
|
-
function
|
|
668
|
-
return
|
|
726
|
+
function findIndex(predicate) {
|
|
727
|
+
return as => {
|
|
728
|
+
return findMapWithIndex_1((i, a) => predicate(a) ? tsplus_module_11.just(i) : tsplus_module_11.nothing())(as);
|
|
729
|
+
};
|
|
669
730
|
}
|
|
670
731
|
|
|
671
|
-
function findWithIndex_1(
|
|
672
|
-
|
|
732
|
+
function findWithIndex_1(p) {
|
|
733
|
+
return as => {
|
|
734
|
+
const len = tsplus_module_5.length(as);
|
|
673
735
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
736
|
+
for (let i = 0; i < len; i++) {
|
|
737
|
+
if (p(i, as._array[i])) {
|
|
738
|
+
return tsplus_module_11.just(as._array[i]);
|
|
739
|
+
}
|
|
677
740
|
}
|
|
678
|
-
}
|
|
679
741
|
|
|
680
|
-
|
|
742
|
+
return tsplus_module_11.nothing();
|
|
743
|
+
};
|
|
681
744
|
}
|
|
682
745
|
/**
|
|
683
|
-
* @tsplus
|
|
746
|
+
* @tsplus pipeable fncts.ImmutableArray findMap
|
|
684
747
|
*/
|
|
685
748
|
|
|
686
749
|
|
|
687
|
-
function
|
|
688
|
-
return
|
|
750
|
+
function findMap(f) {
|
|
751
|
+
return as => {
|
|
752
|
+
return findMapWithIndex_1((_, a) => f(a))(as);
|
|
753
|
+
};
|
|
689
754
|
}
|
|
690
755
|
/**
|
|
691
|
-
* @tsplus
|
|
756
|
+
* @tsplus pipeable fncts.ImmutableArray findMapWithIndex
|
|
692
757
|
*/
|
|
693
758
|
|
|
694
759
|
|
|
695
|
-
function findMapWithIndex_1(
|
|
696
|
-
|
|
760
|
+
function findMapWithIndex_1(f) {
|
|
761
|
+
return as => {
|
|
762
|
+
const len = tsplus_module_5.length(as);
|
|
697
763
|
|
|
698
|
-
|
|
699
|
-
|
|
764
|
+
for (let i = 0; i < len; i++) {
|
|
765
|
+
const v = f(i, as._array[i]);
|
|
700
766
|
|
|
701
|
-
|
|
702
|
-
|
|
767
|
+
if (tsplus_module_6.isJust(v)) {
|
|
768
|
+
return v;
|
|
769
|
+
}
|
|
703
770
|
}
|
|
704
|
-
}
|
|
705
771
|
|
|
706
|
-
|
|
772
|
+
return tsplus_module_11.nothing();
|
|
773
|
+
};
|
|
707
774
|
}
|
|
708
775
|
|
|
709
|
-
function
|
|
710
|
-
|
|
776
|
+
function findLast(p) {
|
|
777
|
+
return as => {
|
|
778
|
+
const len = tsplus_module_5.length(as);
|
|
711
779
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
780
|
+
for (let i = len - 1; i >= 0; i--) {
|
|
781
|
+
if (p(as._array[i])) {
|
|
782
|
+
return tsplus_module_11.just(as._array[i]);
|
|
783
|
+
}
|
|
715
784
|
}
|
|
716
|
-
}
|
|
717
785
|
|
|
718
|
-
|
|
786
|
+
return tsplus_module_11.nothing();
|
|
787
|
+
};
|
|
719
788
|
}
|
|
720
789
|
/**
|
|
721
|
-
* @tsplus
|
|
790
|
+
* @tsplus pipeable fncts.ImmutableArray findLastIndex
|
|
722
791
|
*/
|
|
723
792
|
|
|
724
793
|
|
|
725
|
-
function
|
|
726
|
-
return
|
|
794
|
+
function findLastIndex(p) {
|
|
795
|
+
return self => {
|
|
796
|
+
return findLastMapWithIndex_1((i, a) => p(a) ? tsplus_module_11.just(i) : tsplus_module_11.nothing())(self);
|
|
797
|
+
};
|
|
727
798
|
}
|
|
728
799
|
/**
|
|
729
|
-
* @tsplus
|
|
800
|
+
* @tsplus pipeable fncts.ImmutableArray findLastMap
|
|
730
801
|
*/
|
|
731
802
|
|
|
732
803
|
|
|
733
|
-
function
|
|
734
|
-
return
|
|
804
|
+
function findLastMap(f) {
|
|
805
|
+
return as => {
|
|
806
|
+
return findLastMapWithIndex_1((_, a) => f(a))(as);
|
|
807
|
+
};
|
|
735
808
|
}
|
|
736
809
|
/**
|
|
737
|
-
* @tsplus
|
|
810
|
+
* @tsplus pipeable fncts.ImmutableArray findLastMapWithIndex
|
|
738
811
|
*/
|
|
739
812
|
|
|
740
813
|
|
|
741
|
-
function findLastMapWithIndex_1(
|
|
742
|
-
|
|
814
|
+
function findLastMapWithIndex_1(f) {
|
|
815
|
+
return as => {
|
|
816
|
+
const len = tsplus_module_5.length(as);
|
|
743
817
|
|
|
744
|
-
|
|
745
|
-
|
|
818
|
+
for (let i = len - 1; i >= 0; i--) {
|
|
819
|
+
const v = f(i, as._array[i]);
|
|
746
820
|
|
|
747
|
-
|
|
748
|
-
|
|
821
|
+
if (tsplus_module_6.isJust(v)) {
|
|
822
|
+
return v;
|
|
823
|
+
}
|
|
749
824
|
}
|
|
750
|
-
}
|
|
751
825
|
|
|
752
|
-
|
|
826
|
+
return tsplus_module_11.nothing();
|
|
827
|
+
};
|
|
753
828
|
}
|
|
754
829
|
/**
|
|
755
|
-
* @tsplus
|
|
756
|
-
* @tsplus
|
|
830
|
+
* @tsplus pipeable fncts.ImmutableArray foldLeftWithIndex
|
|
831
|
+
* @tsplus pipeable fncts.MutableArray foldLeftWithIndex
|
|
757
832
|
*/
|
|
758
833
|
|
|
759
834
|
|
|
760
|
-
function foldLeftWithIndex_1(
|
|
761
|
-
|
|
762
|
-
|
|
835
|
+
function foldLeftWithIndex_1(b, f) {
|
|
836
|
+
return self => {
|
|
837
|
+
const len = tsplus_module_5.length(self);
|
|
838
|
+
let r = b;
|
|
763
839
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
840
|
+
for (let i = 0; i < len; i++) {
|
|
841
|
+
r = f(i, r, self._array[i]);
|
|
842
|
+
}
|
|
767
843
|
|
|
768
|
-
|
|
844
|
+
return r;
|
|
845
|
+
};
|
|
769
846
|
}
|
|
770
847
|
/**
|
|
771
|
-
* @tsplus
|
|
772
|
-
* @tsplus
|
|
848
|
+
* @tsplus pipeable fncts.ImmutableArray foldLeft
|
|
849
|
+
* @tsplus pipeable fncts.MutableArray foldLeft
|
|
773
850
|
*/
|
|
774
851
|
|
|
775
852
|
|
|
776
|
-
function foldLeft_1(
|
|
777
|
-
return
|
|
853
|
+
function foldLeft_1(b, f) {
|
|
854
|
+
return self => {
|
|
855
|
+
return foldLeftWithIndex_1(b, (_, b, a) => f(b, a))(self);
|
|
856
|
+
};
|
|
778
857
|
}
|
|
779
858
|
/**
|
|
780
|
-
* @tsplus
|
|
781
|
-
* @tsplus
|
|
859
|
+
* @tsplus pipeable fncts.ImmutableArray foldLeftWhile
|
|
860
|
+
* @tsplus pipeable fncts.MutableArray foldLeftWhile
|
|
782
861
|
*/
|
|
783
862
|
|
|
784
863
|
|
|
785
|
-
function
|
|
786
|
-
return
|
|
864
|
+
function foldLeftWhile(b, p, f) {
|
|
865
|
+
return self => {
|
|
866
|
+
return foldLeftWithIndexWhile_1(b, p, (_, b, a) => f(b, a))(self);
|
|
867
|
+
};
|
|
787
868
|
}
|
|
788
869
|
/**
|
|
789
|
-
* @tsplus
|
|
790
|
-
* @tsplus
|
|
870
|
+
* @tsplus pipeable fncts.ImmutableArray foldLeftWithIndexWhile
|
|
871
|
+
* @tsplus pipeable fncts.MutableArray foldLeftWithIndexWhile
|
|
791
872
|
*/
|
|
792
873
|
|
|
793
874
|
|
|
794
|
-
function foldLeftWithIndexWhile_1(
|
|
795
|
-
|
|
796
|
-
|
|
875
|
+
function foldLeftWithIndexWhile_1(b, p, f) {
|
|
876
|
+
return self => {
|
|
877
|
+
let out = b;
|
|
878
|
+
let cont = p(out);
|
|
797
879
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
880
|
+
for (let i = 0; cont && i < tsplus_module_5.length(self); i++) {
|
|
881
|
+
out = f(i, out, self._array[i]);
|
|
882
|
+
cont = p(out);
|
|
883
|
+
}
|
|
802
884
|
|
|
803
|
-
|
|
885
|
+
return out;
|
|
886
|
+
};
|
|
804
887
|
}
|
|
805
888
|
/**
|
|
806
|
-
* @tsplus
|
|
889
|
+
* @tsplus pipeable fncts.ImmutableArray fold
|
|
807
890
|
*/
|
|
808
891
|
|
|
809
892
|
|
|
810
|
-
function fold_1(
|
|
893
|
+
function fold_1(
|
|
811
894
|
/** @tsplus auto */
|
|
812
895
|
M) {
|
|
813
|
-
return
|
|
896
|
+
return self => {
|
|
897
|
+
return foldLeft_1(M.nat, M.combine)(self);
|
|
898
|
+
};
|
|
814
899
|
}
|
|
815
900
|
/**
|
|
816
|
-
* @tsplus
|
|
901
|
+
* @tsplus pipeable fncts.ImmutableArray foldMapWithIndex
|
|
817
902
|
*/
|
|
818
903
|
|
|
819
904
|
|
|
820
|
-
function foldMapWithIndex_1(
|
|
905
|
+
function foldMapWithIndex_1(f,
|
|
821
906
|
/** @tsplus auto */
|
|
822
907
|
M) {
|
|
823
|
-
return
|
|
908
|
+
return self => {
|
|
909
|
+
return foldLeftWithIndex_1(M.nat, (i, b, a) => M.combine(b, f(i, a)))(self);
|
|
910
|
+
};
|
|
824
911
|
}
|
|
825
912
|
/**
|
|
826
|
-
* @tsplus
|
|
913
|
+
* @tsplus pipeable fncts.ImmutableArray foldMap
|
|
827
914
|
*/
|
|
828
915
|
|
|
829
916
|
|
|
830
|
-
function
|
|
917
|
+
function foldMap(f,
|
|
831
918
|
/** @tsplus auto */
|
|
832
919
|
M) {
|
|
833
|
-
return
|
|
920
|
+
return self => {
|
|
921
|
+
return foldMapWithIndex_1((_, a) => f(a), M)(self);
|
|
922
|
+
};
|
|
834
923
|
}
|
|
835
924
|
/**
|
|
836
|
-
* @tsplus
|
|
925
|
+
* @tsplus pipeable fncts.ImmutableArray foldRightWithIndex
|
|
837
926
|
*/
|
|
838
927
|
|
|
839
928
|
|
|
840
|
-
function foldRightWithIndex_1(
|
|
841
|
-
|
|
929
|
+
function foldRightWithIndex_1(b, f) {
|
|
930
|
+
return self => {
|
|
931
|
+
let r = b;
|
|
842
932
|
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
933
|
+
for (let i = tsplus_module_5.length(self) - 1; i >= 0; i--) {
|
|
934
|
+
r = f(i, self._array[i], r);
|
|
935
|
+
}
|
|
846
936
|
|
|
847
|
-
|
|
937
|
+
return r;
|
|
938
|
+
};
|
|
848
939
|
}
|
|
849
940
|
/**
|
|
850
|
-
* @tsplus
|
|
941
|
+
* @tsplus pipeable fncts.ImmutableArray foldRight
|
|
851
942
|
*/
|
|
852
943
|
|
|
853
944
|
|
|
854
|
-
function
|
|
855
|
-
return
|
|
945
|
+
function foldRight(b, f) {
|
|
946
|
+
return self => {
|
|
947
|
+
return foldRightWithIndex_1(b, (_, a, b) => f(a, b))(self);
|
|
948
|
+
};
|
|
856
949
|
}
|
|
857
950
|
/**
|
|
858
|
-
* @tsplus
|
|
951
|
+
* @tsplus pipeable fncts.ImmutableArray foldRighWhile
|
|
859
952
|
*/
|
|
860
953
|
|
|
861
954
|
|
|
862
|
-
function
|
|
863
|
-
return
|
|
955
|
+
function foldRightWhile(b, p, f) {
|
|
956
|
+
return self => {
|
|
957
|
+
return foldRightWithIndexWhile_1(b, p, (_, a, b) => f(a, b))(self);
|
|
958
|
+
};
|
|
864
959
|
}
|
|
865
960
|
/**
|
|
866
|
-
* @tsplus
|
|
961
|
+
* @tsplus pipeable fncts.ImmutableArray foldRightWithIndexWhile
|
|
867
962
|
*/
|
|
868
963
|
|
|
869
964
|
|
|
870
|
-
function foldRightWithIndexWhile_1(
|
|
871
|
-
|
|
872
|
-
|
|
965
|
+
function foldRightWithIndexWhile_1(b, predicate, f) {
|
|
966
|
+
return self => {
|
|
967
|
+
let out = b;
|
|
968
|
+
let cont = predicate(out);
|
|
873
969
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
970
|
+
for (let i = tsplus_module_5.length(self) - 1; cont && i >= 0; i--) {
|
|
971
|
+
out = f(i, self._array[i], out);
|
|
972
|
+
cont = predicate(out);
|
|
973
|
+
}
|
|
878
974
|
|
|
879
|
-
|
|
975
|
+
return out;
|
|
976
|
+
};
|
|
880
977
|
}
|
|
881
978
|
/**
|
|
882
|
-
* @tsplus
|
|
979
|
+
* @tsplus pipeable fncts.ImmutableArray forEach
|
|
883
980
|
*/
|
|
884
981
|
|
|
885
982
|
|
|
886
|
-
function forEach_1(
|
|
887
|
-
return
|
|
983
|
+
function forEach_1(f) {
|
|
984
|
+
return self => {
|
|
985
|
+
return forEach_1(f)(self);
|
|
986
|
+
};
|
|
888
987
|
}
|
|
889
988
|
/**
|
|
890
|
-
* @tsplus
|
|
891
|
-
* @tsplus
|
|
989
|
+
* @tsplus pipeable fncts.ImmutableArray get
|
|
990
|
+
* @tsplus pipeable fncts.MutableArray get
|
|
892
991
|
*/
|
|
893
992
|
|
|
894
993
|
|
|
895
|
-
function get_1(
|
|
896
|
-
return
|
|
994
|
+
function get_1(i) {
|
|
995
|
+
return self => {
|
|
996
|
+
return isOutOfBound_1(i)(self) ? tsplus_module_11.nothing() : tsplus_module_11.just(self._array[i]);
|
|
997
|
+
};
|
|
897
998
|
}
|
|
999
|
+
/**
|
|
1000
|
+
* @tsplus pipeable fncts.ImmutableArray group
|
|
1001
|
+
*/
|
|
1002
|
+
|
|
898
1003
|
|
|
899
1004
|
function group(E) {
|
|
900
|
-
return
|
|
1005
|
+
return chop_1(self => {
|
|
901
1006
|
const h = self._array[0];
|
|
902
1007
|
const out = [h];
|
|
903
1008
|
let i = 1;
|
|
@@ -912,37 +1017,31 @@ function group(E) {
|
|
|
912
1017
|
}
|
|
913
1018
|
}
|
|
914
1019
|
|
|
915
|
-
return [tsplus_module_12.unsafeAsNonEmptyArray(out), tsplus_module_4.
|
|
1020
|
+
return [tsplus_module_12.unsafeAsNonEmptyArray(out), tsplus_module_4.slice(i)(self)];
|
|
916
1021
|
});
|
|
917
1022
|
}
|
|
918
1023
|
/**
|
|
919
|
-
* @tsplus
|
|
920
|
-
*/
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
function chopSelf(self, E) {
|
|
924
|
-
return group(E)(self);
|
|
925
|
-
}
|
|
926
|
-
/**
|
|
927
|
-
* @tsplus fluent fncts.ImmutableArray groupBy
|
|
1024
|
+
* @tsplus pipeable fncts.ImmutableArray groupBy
|
|
928
1025
|
*/
|
|
929
1026
|
|
|
930
1027
|
|
|
931
|
-
function
|
|
932
|
-
|
|
1028
|
+
function groupBy(f) {
|
|
1029
|
+
return self => {
|
|
1030
|
+
const out = {};
|
|
933
1031
|
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1032
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
|
1033
|
+
const a = self._array[i];
|
|
1034
|
+
const k = f(a);
|
|
937
1035
|
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
1036
|
+
if (Object.prototype.hasOwnProperty.call(out, k)) {
|
|
1037
|
+
out[k].push(a);
|
|
1038
|
+
} else {
|
|
1039
|
+
out[k] = [a];
|
|
1040
|
+
}
|
|
942
1041
|
}
|
|
943
|
-
}
|
|
944
1042
|
|
|
945
|
-
|
|
1043
|
+
return tsplus_module_14.map(tsplus_module_12.from)(tsplus_module_13.Dictionary.get(out));
|
|
1044
|
+
};
|
|
946
1045
|
}
|
|
947
1046
|
/**
|
|
948
1047
|
* @tsplus getter fncts.ImmutableArray head
|
|
@@ -959,30 +1058,40 @@ function head(self) {
|
|
|
959
1058
|
|
|
960
1059
|
function init(self) {
|
|
961
1060
|
const len = tsplus_module_5.length(self);
|
|
962
|
-
return len === 0 ? tsplus_module_11.nothing() : tsplus_module_11.just(tsplus_module_4.
|
|
1061
|
+
return len === 0 ? tsplus_module_11.nothing() : tsplus_module_11.just(tsplus_module_4.slice(0, len - 1)(self));
|
|
963
1062
|
}
|
|
964
1063
|
/**
|
|
965
|
-
* @tsplus
|
|
1064
|
+
* @tsplus pipeable fncts.ImmutableArray insertAt
|
|
966
1065
|
*/
|
|
967
1066
|
|
|
968
1067
|
|
|
969
|
-
function
|
|
970
|
-
return
|
|
1068
|
+
function insertAt(i, a) {
|
|
1069
|
+
return self => {
|
|
1070
|
+
return isOutOfBound_1(i)(self) ? tsplus_module_11.nothing() : tsplus_module_11.just(unsafeInsertAt_1(i, a)(self));
|
|
1071
|
+
};
|
|
971
1072
|
}
|
|
972
1073
|
/**
|
|
973
|
-
* @tsplus
|
|
1074
|
+
* @tsplus pipeable fncts.ImmutableArray intersection
|
|
974
1075
|
*/
|
|
975
1076
|
|
|
976
1077
|
|
|
977
|
-
function
|
|
1078
|
+
function intersection(that,
|
|
978
1079
|
/** @tsplus auto */
|
|
979
1080
|
E) {
|
|
980
|
-
return
|
|
1081
|
+
return self => {
|
|
1082
|
+
return filter_1(a => elem_1(a, E)(that))(self);
|
|
1083
|
+
};
|
|
981
1084
|
}
|
|
1085
|
+
/**
|
|
1086
|
+
* @tsplus pipeable fncts.ImmutableArray intersperse
|
|
1087
|
+
*/
|
|
982
1088
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
return
|
|
1089
|
+
|
|
1090
|
+
function intersperse(a) {
|
|
1091
|
+
return self => {
|
|
1092
|
+
const len = tsplus_module_5.length(self);
|
|
1093
|
+
return len === 0 ? self : prepend_1(unsafeGet_1(self, 0))(prependAll_1(a)(tsplus_module_4.slice(1, len)(self)));
|
|
1094
|
+
};
|
|
986
1095
|
}
|
|
987
1096
|
/**
|
|
988
1097
|
* @tsplus fluent fncts.ImmutableArray isEmpty
|
|
@@ -993,20 +1102,24 @@ function isEmpty_1(self) {
|
|
|
993
1102
|
return tsplus_module_5.length(self) === 0;
|
|
994
1103
|
}
|
|
995
1104
|
/**
|
|
996
|
-
* @tsplus
|
|
1105
|
+
* @tsplus pipeable fncts.ImmutableArray isOutOfBound
|
|
997
1106
|
*/
|
|
998
1107
|
|
|
999
1108
|
|
|
1000
|
-
function isOutOfBound_1(
|
|
1001
|
-
return
|
|
1109
|
+
function isOutOfBound_1(i) {
|
|
1110
|
+
return self => {
|
|
1111
|
+
return i < 0 || i >= tsplus_module_5.length(self);
|
|
1112
|
+
};
|
|
1002
1113
|
}
|
|
1003
1114
|
/**
|
|
1004
|
-
* @tsplus
|
|
1115
|
+
* @tsplus pipeable fncts.ImmutableArray join
|
|
1005
1116
|
*/
|
|
1006
1117
|
|
|
1007
1118
|
|
|
1008
|
-
function join(
|
|
1009
|
-
return self
|
|
1119
|
+
function join(separator) {
|
|
1120
|
+
return self => {
|
|
1121
|
+
return self._array.join(separator);
|
|
1122
|
+
};
|
|
1010
1123
|
}
|
|
1011
1124
|
/**
|
|
1012
1125
|
* @tsplus getter fncts.ImmutableArray last
|
|
@@ -1014,7 +1127,7 @@ function join(self, separator) {
|
|
|
1014
1127
|
|
|
1015
1128
|
|
|
1016
1129
|
function last(self) {
|
|
1017
|
-
return get_1(
|
|
1130
|
+
return get_1(tsplus_module_5.length(self) - 1)(self);
|
|
1018
1131
|
}
|
|
1019
1132
|
/**
|
|
1020
1133
|
* @tsplus getter fncts.ImmutableArray length
|
|
@@ -1046,62 +1159,72 @@ function lefts(self) {
|
|
|
1046
1159
|
return tsplus_module_2.asImmutableArray(ls);
|
|
1047
1160
|
}
|
|
1048
1161
|
/**
|
|
1049
|
-
* @tsplus
|
|
1162
|
+
* @tsplus pipeable fncts.ImmutableArray map
|
|
1050
1163
|
*/
|
|
1051
1164
|
|
|
1052
1165
|
|
|
1053
|
-
function map_1(
|
|
1054
|
-
return
|
|
1166
|
+
function map_1(f) {
|
|
1167
|
+
return self => {
|
|
1168
|
+
return mapWithIndex_1((_, a) => f(a))(self);
|
|
1169
|
+
};
|
|
1055
1170
|
}
|
|
1056
1171
|
/**
|
|
1057
|
-
* @tsplus
|
|
1172
|
+
* @tsplus pipeable fncts.ImmutableArray mapAccum
|
|
1058
1173
|
*/
|
|
1059
1174
|
|
|
1060
1175
|
|
|
1061
|
-
function
|
|
1062
|
-
|
|
1063
|
-
|
|
1176
|
+
function mapAccum(s, f) {
|
|
1177
|
+
return self => {
|
|
1178
|
+
const bs = Array(tsplus_module_5.length(self));
|
|
1179
|
+
let state = s;
|
|
1064
1180
|
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1181
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
|
1182
|
+
const result = f(state, self._array[i]);
|
|
1183
|
+
bs[i] = result[0];
|
|
1184
|
+
state = result[1];
|
|
1185
|
+
}
|
|
1070
1186
|
|
|
1071
|
-
|
|
1187
|
+
return [tsplus_module_2.asImmutableArray(bs), state];
|
|
1188
|
+
};
|
|
1072
1189
|
}
|
|
1073
1190
|
/**
|
|
1074
|
-
* @tsplus
|
|
1191
|
+
* @tsplus pipeable fncts.ImmutableArray mapWithIndex
|
|
1075
1192
|
*/
|
|
1076
1193
|
|
|
1077
1194
|
|
|
1078
|
-
function mapWithIndex_1(
|
|
1079
|
-
|
|
1080
|
-
|
|
1195
|
+
function mapWithIndex_1(f) {
|
|
1196
|
+
return self => {
|
|
1197
|
+
const len = self._array.length;
|
|
1198
|
+
const bs = Array(len);
|
|
1081
1199
|
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1200
|
+
for (let i = 0; i < len; i++) {
|
|
1201
|
+
bs[i] = f(i, self._array[i]);
|
|
1202
|
+
}
|
|
1085
1203
|
|
|
1086
|
-
|
|
1204
|
+
return tsplus_module_2.asImmutableArray(bs);
|
|
1205
|
+
};
|
|
1087
1206
|
}
|
|
1088
1207
|
/**
|
|
1089
|
-
* @tsplus
|
|
1208
|
+
* @tsplus pipeable fncts.ImmutableArray modifyAt
|
|
1090
1209
|
*/
|
|
1091
1210
|
|
|
1092
1211
|
|
|
1093
|
-
function
|
|
1094
|
-
return
|
|
1212
|
+
function modifyAt(i, f) {
|
|
1213
|
+
return self => {
|
|
1214
|
+
return isOutOfBound_1(i)(self) ? tsplus_module_11.nothing() : tsplus_module_11.just(unsafeModifyAt_1(i, f)(self));
|
|
1215
|
+
};
|
|
1095
1216
|
}
|
|
1096
1217
|
/**
|
|
1097
|
-
* @tsplus
|
|
1218
|
+
* @tsplus pipeable fncts.ImmutableArray mutate
|
|
1098
1219
|
*/
|
|
1099
1220
|
|
|
1100
1221
|
|
|
1101
|
-
function mutate_1(
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1222
|
+
function mutate_1(f) {
|
|
1223
|
+
return self => {
|
|
1224
|
+
const mut = mutableClone_1(self);
|
|
1225
|
+
f(mut);
|
|
1226
|
+
return tsplus_module_2.asImmutableArray(mut);
|
|
1227
|
+
};
|
|
1105
1228
|
}
|
|
1106
1229
|
/**
|
|
1107
1230
|
* @tsplus getter fncts.ImmutableArray mutableClone
|
|
@@ -1109,97 +1232,108 @@ function mutate_1(self, f) {
|
|
|
1109
1232
|
|
|
1110
1233
|
|
|
1111
1234
|
function mutableClone_1(self) {
|
|
1112
|
-
return tsplus_module_4.
|
|
1235
|
+
return tsplus_module_4.slice(0)(self)._array;
|
|
1113
1236
|
}
|
|
1114
1237
|
|
|
1115
|
-
function partitionWithIndex_1(
|
|
1116
|
-
|
|
1117
|
-
|
|
1238
|
+
function partitionWithIndex_1(p) {
|
|
1239
|
+
return self => {
|
|
1240
|
+
const left = [];
|
|
1241
|
+
const right = [];
|
|
1118
1242
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1243
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
|
1244
|
+
const a = self._array[i];
|
|
1121
1245
|
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1246
|
+
if (p(i, a)) {
|
|
1247
|
+
right.push(a);
|
|
1248
|
+
} else {
|
|
1249
|
+
left.push(a);
|
|
1250
|
+
}
|
|
1126
1251
|
}
|
|
1127
|
-
}
|
|
1128
1252
|
|
|
1129
|
-
|
|
1253
|
+
return [tsplus_module_2.asImmutableArray(left), tsplus_module_2.asImmutableArray(right)];
|
|
1254
|
+
};
|
|
1130
1255
|
}
|
|
1131
1256
|
|
|
1132
|
-
function
|
|
1133
|
-
return
|
|
1257
|
+
function partition(p) {
|
|
1258
|
+
return self => {
|
|
1259
|
+
return partitionWithIndex_1((_, a) => p(a))(self);
|
|
1260
|
+
};
|
|
1134
1261
|
}
|
|
1135
1262
|
/**
|
|
1136
|
-
* @tsplus
|
|
1263
|
+
* @tsplus pipeable fncts.ImmutableArray partitionMapWithIndex
|
|
1137
1264
|
*/
|
|
1138
1265
|
|
|
1139
1266
|
|
|
1140
|
-
function partitionMapWithIndex_1(
|
|
1141
|
-
|
|
1142
|
-
|
|
1267
|
+
function partitionMapWithIndex_1(f) {
|
|
1268
|
+
return self => {
|
|
1269
|
+
const left = [];
|
|
1270
|
+
const right = [];
|
|
1143
1271
|
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1272
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
|
1273
|
+
const ea = f(i, self._array[i]);
|
|
1274
|
+
void 0;
|
|
1147
1275
|
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1276
|
+
switch (ea._tag) {
|
|
1277
|
+
case "Left"
|
|
1278
|
+
/* EitherTag.Left */
|
|
1279
|
+
:
|
|
1280
|
+
left.push(ea.left);
|
|
1281
|
+
break;
|
|
1154
1282
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1283
|
+
case "Right"
|
|
1284
|
+
/* EitherTag.Right */
|
|
1285
|
+
:
|
|
1286
|
+
right.push(ea.right);
|
|
1287
|
+
break;
|
|
1288
|
+
}
|
|
1160
1289
|
}
|
|
1161
|
-
}
|
|
1162
1290
|
|
|
1163
|
-
|
|
1291
|
+
return [tsplus_module_2.asImmutableArray(left), tsplus_module_2.asImmutableArray(right)];
|
|
1292
|
+
};
|
|
1164
1293
|
}
|
|
1165
1294
|
/**
|
|
1166
|
-
* @tsplus
|
|
1295
|
+
* @tsplus pipeable fncts.ImmutableArray partitionMap
|
|
1167
1296
|
*/
|
|
1168
1297
|
|
|
1169
1298
|
|
|
1170
|
-
function
|
|
1171
|
-
return
|
|
1299
|
+
function partitionMap(f) {
|
|
1300
|
+
return self => {
|
|
1301
|
+
return partitionMapWithIndex_1((_, a) => f(a))(self);
|
|
1302
|
+
};
|
|
1172
1303
|
}
|
|
1173
1304
|
/**
|
|
1174
|
-
* @tsplus
|
|
1305
|
+
* @tsplus pipeable fncts.ImmutableArray prepend
|
|
1175
1306
|
*/
|
|
1176
1307
|
|
|
1177
1308
|
|
|
1178
|
-
function prepend_1(
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1309
|
+
function prepend_1(head) {
|
|
1310
|
+
return self => {
|
|
1311
|
+
const len = tsplus_module_5.length(self);
|
|
1312
|
+
const out = Array(len + 1);
|
|
1313
|
+
out[0] = head;
|
|
1182
1314
|
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1315
|
+
for (let i = 0; i < len; i++) {
|
|
1316
|
+
out[i + 1] = self._array[i];
|
|
1317
|
+
}
|
|
1186
1318
|
|
|
1187
|
-
|
|
1319
|
+
return tsplus_module_2.asImmutableArray(out);
|
|
1320
|
+
};
|
|
1188
1321
|
}
|
|
1189
1322
|
/**
|
|
1190
|
-
* @tsplus
|
|
1191
|
-
* @tsplus fluent fncts.MutableArray prependAll
|
|
1323
|
+
* @tsplus pipeable fncts.ImmutableArray prependAll
|
|
1192
1324
|
*/
|
|
1193
1325
|
|
|
1194
1326
|
|
|
1195
|
-
function prependAll_1(
|
|
1196
|
-
|
|
1327
|
+
function prependAll_1(a) {
|
|
1328
|
+
return self => {
|
|
1329
|
+
const out = [];
|
|
1197
1330
|
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1331
|
+
for (let i = 0; i < tsplus_module_5.length(self); i++) {
|
|
1332
|
+
out.push(a, self._array[i]);
|
|
1333
|
+
}
|
|
1201
1334
|
|
|
1202
|
-
|
|
1335
|
+
return tsplus_module_2.asImmutableArray(out);
|
|
1336
|
+
};
|
|
1203
1337
|
}
|
|
1204
1338
|
/**
|
|
1205
1339
|
* @tsplus getter fncts.ImmutableArray reverse
|
|
@@ -1243,139 +1377,157 @@ function rights(self) {
|
|
|
1243
1377
|
return tsplus_module_2.asImmutableArray(rs);
|
|
1244
1378
|
}
|
|
1245
1379
|
/**
|
|
1246
|
-
* @tsplus
|
|
1380
|
+
* @tsplus pipeable fncts.ImmutableArray rotate
|
|
1247
1381
|
*/
|
|
1248
1382
|
|
|
1249
1383
|
|
|
1250
|
-
function rotate_1(
|
|
1251
|
-
|
|
1384
|
+
function rotate_1(n) {
|
|
1385
|
+
return self => {
|
|
1386
|
+
const len = tsplus_module_5.length(self);
|
|
1252
1387
|
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1388
|
+
if (n === 0 || len <= 1 || len === Math.abs(n)) {
|
|
1389
|
+
return self;
|
|
1390
|
+
} else if (n < 0) {
|
|
1391
|
+
return rotate_1(len + n)(self);
|
|
1392
|
+
} else {
|
|
1393
|
+
return concat_1(tsplus_module_4.slice(0, len - n)(self))(tsplus_module_4.slice(-n)(self));
|
|
1394
|
+
}
|
|
1395
|
+
};
|
|
1260
1396
|
}
|
|
1261
1397
|
/**
|
|
1262
|
-
* @tsplus
|
|
1398
|
+
* @tsplus pipeable fncts.ImmutableArray scanLeft
|
|
1263
1399
|
*/
|
|
1264
1400
|
|
|
1265
1401
|
|
|
1266
|
-
function
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1402
|
+
function scanLeft(b, f) {
|
|
1403
|
+
return self => {
|
|
1404
|
+
const l = tsplus_module_5.length(self);
|
|
1405
|
+
const r = Array(l + 1);
|
|
1406
|
+
r[0] = b;
|
|
1270
1407
|
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1408
|
+
for (let i = 0; i < l; i++) {
|
|
1409
|
+
r[i + 1] = f(r[i], self._array[i]);
|
|
1410
|
+
}
|
|
1274
1411
|
|
|
1275
|
-
|
|
1412
|
+
return tsplus_module_2.asImmutableArray(r);
|
|
1413
|
+
};
|
|
1276
1414
|
}
|
|
1277
1415
|
/**
|
|
1278
|
-
* @tsplus
|
|
1416
|
+
* @tsplus pipeable fncts.ImmutableArray scanRight
|
|
1279
1417
|
*/
|
|
1280
1418
|
|
|
1281
1419
|
|
|
1282
|
-
function
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1420
|
+
function scanRight(b, f) {
|
|
1421
|
+
return self => {
|
|
1422
|
+
const l = tsplus_module_5.length(self);
|
|
1423
|
+
const r = Array(l + 1);
|
|
1424
|
+
r[l] = b;
|
|
1286
1425
|
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1426
|
+
for (let i = l - 1; i >= 0; i--) {
|
|
1427
|
+
r[i] = f(self._array[i], r[i + 1]);
|
|
1428
|
+
}
|
|
1290
1429
|
|
|
1291
|
-
|
|
1430
|
+
return tsplus_module_2.asImmutableArray(r);
|
|
1431
|
+
};
|
|
1292
1432
|
}
|
|
1293
1433
|
/**
|
|
1294
|
-
* @tsplus
|
|
1434
|
+
* @tsplus pipeable fncts.ImmutableArray sort
|
|
1295
1435
|
*/
|
|
1296
1436
|
|
|
1297
1437
|
|
|
1298
|
-
function sort_1(
|
|
1438
|
+
function sort_1(
|
|
1299
1439
|
/** @tsplus auto */
|
|
1300
1440
|
O) {
|
|
1301
|
-
return
|
|
1441
|
+
return self => {
|
|
1442
|
+
return isEmpty_1(self) || tsplus_module_5.length(self) === 1 ? self : tsplus_module_2.asImmutableArray(self._array.slice().sort(O.compare));
|
|
1443
|
+
};
|
|
1302
1444
|
}
|
|
1303
1445
|
/**
|
|
1304
|
-
* @tsplus
|
|
1446
|
+
* @tsplus pipeable fncts.ImmutableArray sortBy
|
|
1305
1447
|
*/
|
|
1306
1448
|
|
|
1307
1449
|
|
|
1308
|
-
function sortBy(
|
|
1309
|
-
return
|
|
1450
|
+
function sortBy(Os) {
|
|
1451
|
+
return self => {
|
|
1452
|
+
return sort_1(fold_1(tsplus_module_15.getMonoid())(Os))(self);
|
|
1453
|
+
};
|
|
1310
1454
|
}
|
|
1311
1455
|
|
|
1312
|
-
function
|
|
1313
|
-
|
|
1314
|
-
|
|
1456
|
+
function spanLeft(p) {
|
|
1457
|
+
return self => {
|
|
1458
|
+
const i = spanIndexLeft_1(p)(self);
|
|
1459
|
+
const init = Array(i);
|
|
1315
1460
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1461
|
+
for (let j = 0; j < i; j++) {
|
|
1462
|
+
init[j] = self._array[j];
|
|
1463
|
+
}
|
|
1319
1464
|
|
|
1320
|
-
|
|
1321
|
-
|
|
1465
|
+
const l = tsplus_module_5.length(self);
|
|
1466
|
+
const rest = Array(l - i);
|
|
1322
1467
|
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1468
|
+
for (let j = i; j < l; j++) {
|
|
1469
|
+
rest[j - i] = self._array[j];
|
|
1470
|
+
}
|
|
1326
1471
|
|
|
1327
|
-
|
|
1472
|
+
return [tsplus_module_2.asImmutableArray(init), tsplus_module_2.asImmutableArray(rest)];
|
|
1473
|
+
};
|
|
1328
1474
|
}
|
|
1329
1475
|
|
|
1330
|
-
function
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1476
|
+
function spanRight(p) {
|
|
1477
|
+
return self => {
|
|
1478
|
+
const i = spanIndexRight_1(p)(self);
|
|
1479
|
+
const l = tsplus_module_5.length(self);
|
|
1480
|
+
const tail = Array(l - i - 1);
|
|
1334
1481
|
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1482
|
+
for (let j = l - 1; j > i; j--) {
|
|
1483
|
+
tail[j - i - 1] = self._array[j];
|
|
1484
|
+
}
|
|
1338
1485
|
|
|
1339
|
-
|
|
1486
|
+
const rest = Array(i);
|
|
1340
1487
|
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1488
|
+
for (let j = i; j >= 0; j--) {
|
|
1489
|
+
rest[j] = self._array[j];
|
|
1490
|
+
}
|
|
1344
1491
|
|
|
1345
|
-
|
|
1492
|
+
return [tsplus_module_2.asImmutableArray(rest), tsplus_module_2.asImmutableArray(tail)];
|
|
1493
|
+
};
|
|
1346
1494
|
}
|
|
1347
1495
|
/**
|
|
1348
|
-
* @tsplus
|
|
1496
|
+
* @tsplus pipeable fncts.ImmutableArray spanIndexLeft
|
|
1349
1497
|
*/
|
|
1350
1498
|
|
|
1351
1499
|
|
|
1352
|
-
function spanIndexLeft_1(
|
|
1353
|
-
|
|
1354
|
-
|
|
1500
|
+
function spanIndexLeft_1(p) {
|
|
1501
|
+
return self => {
|
|
1502
|
+
const l = tsplus_module_5.length(self);
|
|
1503
|
+
let i = 0;
|
|
1355
1504
|
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1505
|
+
for (; i < l; i++) {
|
|
1506
|
+
if (!p(self._array[i])) {
|
|
1507
|
+
break;
|
|
1508
|
+
}
|
|
1359
1509
|
}
|
|
1360
|
-
}
|
|
1361
1510
|
|
|
1362
|
-
|
|
1511
|
+
return i;
|
|
1512
|
+
};
|
|
1363
1513
|
}
|
|
1364
1514
|
/**
|
|
1365
|
-
* @tsplus
|
|
1515
|
+
* @tsplus pipeable fncts.ImmutableArray spanIndexRight
|
|
1366
1516
|
*/
|
|
1367
1517
|
|
|
1368
1518
|
|
|
1369
|
-
function spanIndexRight_1(
|
|
1370
|
-
|
|
1519
|
+
function spanIndexRight_1(predicate) {
|
|
1520
|
+
return as => {
|
|
1521
|
+
let i = tsplus_module_5.length(as) - 1;
|
|
1371
1522
|
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1523
|
+
for (; i >= 0; i--) {
|
|
1524
|
+
if (!predicate(as._array[i])) {
|
|
1525
|
+
break;
|
|
1526
|
+
}
|
|
1375
1527
|
}
|
|
1376
|
-
}
|
|
1377
1528
|
|
|
1378
|
-
|
|
1529
|
+
return i;
|
|
1530
|
+
};
|
|
1379
1531
|
}
|
|
1380
1532
|
/**
|
|
1381
1533
|
* @tsplus getter fncts.ImmutableArray tail
|
|
@@ -1383,86 +1535,99 @@ function spanIndexRight_1(as, predicate) {
|
|
|
1383
1535
|
|
|
1384
1536
|
|
|
1385
1537
|
function tail(self) {
|
|
1386
|
-
return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just(tsplus_module_4.
|
|
1538
|
+
return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just(tsplus_module_4.slice(1)(self)) : tsplus_module_11.nothing();
|
|
1387
1539
|
}
|
|
1388
1540
|
/**
|
|
1389
|
-
* @tsplus
|
|
1541
|
+
* @tsplus pipeable fncts.ImmutableArray take
|
|
1390
1542
|
*/
|
|
1391
1543
|
|
|
1392
1544
|
|
|
1393
|
-
function
|
|
1394
|
-
return
|
|
1545
|
+
function take(n) {
|
|
1546
|
+
return self => {
|
|
1547
|
+
return tsplus_module_4.slice(0, n)(self);
|
|
1548
|
+
};
|
|
1395
1549
|
}
|
|
1396
1550
|
/**
|
|
1397
|
-
* @tsplus
|
|
1551
|
+
* @tsplus pipeable fncts.ImmutableArray takeLast
|
|
1398
1552
|
*/
|
|
1399
1553
|
|
|
1400
1554
|
|
|
1401
|
-
function
|
|
1402
|
-
return
|
|
1555
|
+
function takeLast(n) {
|
|
1556
|
+
return as => {
|
|
1557
|
+
return isEmpty_1(as) ? tsplus_module_2.empty() : tsplus_module_4.slice(-n)(as);
|
|
1558
|
+
};
|
|
1403
1559
|
}
|
|
1404
1560
|
|
|
1405
|
-
function
|
|
1406
|
-
|
|
1407
|
-
|
|
1561
|
+
function takeWhile(p) {
|
|
1562
|
+
return self => {
|
|
1563
|
+
const i = spanIndexLeft_1(p)(self);
|
|
1564
|
+
const init = Array(i);
|
|
1408
1565
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1566
|
+
for (let j = 0; j < i; j++) {
|
|
1567
|
+
init[j] = self._array[j];
|
|
1568
|
+
}
|
|
1412
1569
|
|
|
1413
|
-
|
|
1570
|
+
return tsplus_module_2.asImmutableArray(init);
|
|
1571
|
+
};
|
|
1414
1572
|
}
|
|
1415
|
-
/**
|
|
1416
|
-
* @tsplus getter fncts.ImmutableArray traverseWithIndex
|
|
1417
|
-
*/
|
|
1418
1573
|
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1574
|
+
function _traverseWithIndex_1(self) {
|
|
1575
|
+
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);
|
|
1576
|
+
}
|
|
1422
1577
|
/**
|
|
1423
1578
|
* @tsplus getter fncts.ImmutableArray traverse
|
|
1424
1579
|
*/
|
|
1425
1580
|
|
|
1426
|
-
exports.traverseWithIndex_ = traverseWithIndex_;
|
|
1427
1581
|
|
|
1428
|
-
|
|
1582
|
+
function _traverse_1(self) {
|
|
1583
|
+
return G => f => _traverseWithIndex_1(self)(G)((_, a) => f(a));
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
const traverseWithIndex = G => f => self => _traverseWithIndex_1(self)(G)(f);
|
|
1587
|
+
|
|
1588
|
+
exports.traverseWithIndex = traverseWithIndex;
|
|
1429
1589
|
|
|
1430
|
-
const
|
|
1590
|
+
const traverse = G => f => self => _traverseWithIndex_1(self)(G)((_, a) => f(a));
|
|
1431
1591
|
/**
|
|
1432
|
-
* @tsplus
|
|
1592
|
+
* @tsplus pipeable fncts.ImmutableArray union
|
|
1433
1593
|
*/
|
|
1434
1594
|
|
|
1435
|
-
exports.traverse_ = traverse_;
|
|
1436
1595
|
|
|
1437
|
-
|
|
1596
|
+
exports.traverse = traverse;
|
|
1597
|
+
|
|
1598
|
+
function union(that,
|
|
1438
1599
|
/** @tsplus auto */
|
|
1439
1600
|
E) {
|
|
1440
|
-
return
|
|
1601
|
+
return self => {
|
|
1602
|
+
return concat_1(filter_1(a => !elem_1(a, E)(self))(that))(self);
|
|
1603
|
+
};
|
|
1441
1604
|
}
|
|
1442
1605
|
/**
|
|
1443
|
-
* @tsplus
|
|
1606
|
+
* @tsplus pipeable fncts.ImmutableArray uniq
|
|
1444
1607
|
*/
|
|
1445
1608
|
|
|
1446
1609
|
|
|
1447
|
-
function uniq(
|
|
1610
|
+
function uniq(
|
|
1448
1611
|
/** @tsplus auto */
|
|
1449
1612
|
E) {
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1613
|
+
return self => {
|
|
1614
|
+
if (tsplus_module_5.length(self) === 1) {
|
|
1615
|
+
return self;
|
|
1616
|
+
}
|
|
1453
1617
|
|
|
1454
|
-
|
|
1455
|
-
|
|
1618
|
+
const out = [];
|
|
1619
|
+
const len = tsplus_module_5.length(self);
|
|
1456
1620
|
|
|
1457
|
-
|
|
1458
|
-
|
|
1621
|
+
for (let i = 0; i < len; i++) {
|
|
1622
|
+
const a = self._array[i];
|
|
1459
1623
|
|
|
1460
|
-
|
|
1461
|
-
|
|
1624
|
+
if (!elem_1(a, E)(tsplus_module_2.asImmutableArray(out))) {
|
|
1625
|
+
out.push(a);
|
|
1626
|
+
}
|
|
1462
1627
|
}
|
|
1463
|
-
}
|
|
1464
1628
|
|
|
1465
|
-
|
|
1629
|
+
return tsplus_module_2.asImmutableArray(out);
|
|
1630
|
+
};
|
|
1466
1631
|
}
|
|
1467
1632
|
/**
|
|
1468
1633
|
* @tsplus getter fncts.ImmutableArray unprepend
|
|
@@ -1470,7 +1635,7 @@ E) {
|
|
|
1470
1635
|
|
|
1471
1636
|
|
|
1472
1637
|
function unprepend(self) {
|
|
1473
|
-
return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just([unsafeGet_1(self, 0), tsplus_module_4.
|
|
1638
|
+
return tsplus_module_5.isNonEmpty(self) ? tsplus_module_11.just([unsafeGet_1(self, 0), tsplus_module_4.slice(1)(self)]) : tsplus_module_11.nothing();
|
|
1474
1639
|
}
|
|
1475
1640
|
/**
|
|
1476
1641
|
* @tsplus index fncts.ImmutableArray
|
|
@@ -1489,54 +1654,62 @@ function unsafeAsMutable_1(self) {
|
|
|
1489
1654
|
return self._array;
|
|
1490
1655
|
}
|
|
1491
1656
|
/**
|
|
1492
|
-
* @tsplus
|
|
1657
|
+
* @tsplus pipeable fncts.ImmutableArray unsafeDeleteAt
|
|
1493
1658
|
*/
|
|
1494
1659
|
|
|
1495
1660
|
|
|
1496
|
-
function unsafeDeleteAt_1(
|
|
1497
|
-
return
|
|
1498
|
-
xs
|
|
1499
|
-
|
|
1661
|
+
function unsafeDeleteAt_1(i) {
|
|
1662
|
+
return self => {
|
|
1663
|
+
return mutate_1(xs => {
|
|
1664
|
+
xs.splice(i, 1);
|
|
1665
|
+
})(self);
|
|
1666
|
+
};
|
|
1500
1667
|
}
|
|
1501
1668
|
/**
|
|
1502
|
-
* @tsplus
|
|
1669
|
+
* @tsplus pipeable fncts.ImmutableArray unsafeInsertAt
|
|
1503
1670
|
*/
|
|
1504
1671
|
|
|
1505
1672
|
|
|
1506
|
-
function unsafeInsertAt_1(
|
|
1507
|
-
return
|
|
1508
|
-
xs
|
|
1509
|
-
|
|
1673
|
+
function unsafeInsertAt_1(i, a) {
|
|
1674
|
+
return as => {
|
|
1675
|
+
return mutate_1(xs => {
|
|
1676
|
+
xs.splice(i, 0, a);
|
|
1677
|
+
})(as);
|
|
1678
|
+
};
|
|
1510
1679
|
}
|
|
1511
1680
|
/**
|
|
1512
|
-
* @tsplus
|
|
1681
|
+
* @tsplus pipeable fncts.ImmutableArray unsafeModifyAt
|
|
1513
1682
|
*/
|
|
1514
1683
|
|
|
1515
1684
|
|
|
1516
|
-
function unsafeModifyAt_1(
|
|
1517
|
-
|
|
1685
|
+
function unsafeModifyAt_1(i, f) {
|
|
1686
|
+
return as => {
|
|
1687
|
+
const next = f(unsafeGet_1(as, i));
|
|
1518
1688
|
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1689
|
+
if (unsafeGet_1(as, i) === next) {
|
|
1690
|
+
return as;
|
|
1691
|
+
}
|
|
1522
1692
|
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1693
|
+
return mutate_1(xs => {
|
|
1694
|
+
xs[i] = next;
|
|
1695
|
+
})(as);
|
|
1696
|
+
};
|
|
1526
1697
|
}
|
|
1527
1698
|
/**
|
|
1528
|
-
* @tsplus
|
|
1699
|
+
* @tsplus pipeable fncts.ImmutableArray unsafeUpdateAt
|
|
1529
1700
|
*/
|
|
1530
1701
|
|
|
1531
1702
|
|
|
1532
|
-
function unsafeUpdateAt_1(
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
xs
|
|
1538
|
-
|
|
1539
|
-
|
|
1703
|
+
function unsafeUpdateAt_1(i, a) {
|
|
1704
|
+
return as => {
|
|
1705
|
+
if (unsafeGet_1(as, i) === a) {
|
|
1706
|
+
return as;
|
|
1707
|
+
} else {
|
|
1708
|
+
return mutate_1(xs => {
|
|
1709
|
+
xs[i] = a;
|
|
1710
|
+
})(as);
|
|
1711
|
+
}
|
|
1712
|
+
};
|
|
1540
1713
|
}
|
|
1541
1714
|
/**
|
|
1542
1715
|
* @tsplus getter fncts.ImmutableArray unzip
|
|
@@ -1555,79 +1728,100 @@ function unzip(self) {
|
|
|
1555
1728
|
return [tsplus_module_2.asImmutableArray(fa), tsplus_module_2.asImmutableArray(fb)];
|
|
1556
1729
|
}
|
|
1557
1730
|
/**
|
|
1558
|
-
* @tsplus
|
|
1731
|
+
* @tsplus pipeable fncts.ImmutableArray updateAt
|
|
1559
1732
|
*/
|
|
1560
1733
|
|
|
1561
1734
|
|
|
1562
|
-
function
|
|
1563
|
-
return
|
|
1735
|
+
function updateAt(i, a) {
|
|
1736
|
+
return as => {
|
|
1737
|
+
return isOutOfBound_1(i)(as) ? tsplus_module_11.nothing() : tsplus_module_11.just(unsafeUpdateAt_1(i, a)(as));
|
|
1738
|
+
};
|
|
1564
1739
|
}
|
|
1565
1740
|
/**
|
|
1566
1741
|
* @tsplus getter fncts.ImmutableArray wiltWithIndex
|
|
1567
1742
|
*/
|
|
1568
1743
|
|
|
1569
1744
|
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1745
|
+
function _wiltWithIndex_1(self) {
|
|
1746
|
+
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 => {
|
|
1747
|
+
r[0].push(b1);
|
|
1748
|
+
return r;
|
|
1749
|
+
}, b2 => {
|
|
1750
|
+
r[1].push(b2);
|
|
1751
|
+
return r;
|
|
1752
|
+
})(eb))(f(i, a)))(self));
|
|
1753
|
+
}
|
|
1578
1754
|
/**
|
|
1579
1755
|
* @tsplus getter fncts.ImmutableArray wilt
|
|
1580
1756
|
*/
|
|
1581
1757
|
|
|
1582
|
-
exports.wiltWithIndex = wiltWithIndex;
|
|
1583
1758
|
|
|
1584
|
-
|
|
1759
|
+
function _wilt(self) {
|
|
1760
|
+
return G => f => _wiltWithIndex_1(self)(G)((_, a) => f(a));
|
|
1761
|
+
}
|
|
1585
1762
|
/**
|
|
1586
1763
|
* @tsplus getter fncts.ImmutableArray witherWithIndex
|
|
1587
1764
|
*/
|
|
1588
1765
|
|
|
1589
1766
|
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
return G.map(foldLeftWithIndex_1(self, G.pure([]), (i, b, a) => G.zipWith(f(i, a), b, (maybeB, bs) => {
|
|
1767
|
+
function _witherWithIndex_1(self) {
|
|
1768
|
+
return G => f => G.map(bs => tsplus_module_2.asImmutableArray(bs))(foldLeftWithIndex_1(G.pure([]), (i, b, a) => G.zipWith(b, (maybeB, bs) => {
|
|
1593
1769
|
if (tsplus_module_6.isJust(maybeB)) {
|
|
1594
1770
|
bs.push(maybeB.value);
|
|
1595
1771
|
}
|
|
1596
1772
|
|
|
1597
1773
|
return bs;
|
|
1598
|
-
})
|
|
1599
|
-
}
|
|
1600
|
-
const witherWithIndex = witherWithIndex_1;
|
|
1774
|
+
})(f(i, a)))(self));
|
|
1775
|
+
}
|
|
1601
1776
|
/**
|
|
1602
1777
|
* @tsplus getter fncts.ImmutableArray wither
|
|
1603
1778
|
*/
|
|
1604
1779
|
|
|
1780
|
+
|
|
1781
|
+
function _wither(self) {
|
|
1782
|
+
return G => f => _witherWithIndex_1(self)(G)((_, a) => f(a));
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
const wiltWithIndex = G => f => self => _wiltWithIndex_1(self)(G)(f);
|
|
1786
|
+
|
|
1787
|
+
exports.wiltWithIndex = wiltWithIndex;
|
|
1788
|
+
|
|
1789
|
+
const wilt = G => f => self => _wiltWithIndex_1(self)(G)((_, a) => f(a));
|
|
1790
|
+
|
|
1791
|
+
exports.wilt = wilt;
|
|
1792
|
+
|
|
1793
|
+
const witherWithIndex = G => f => self => _witherWithIndex_1(self)(G)(f);
|
|
1794
|
+
|
|
1605
1795
|
exports.witherWithIndex = witherWithIndex;
|
|
1606
1796
|
|
|
1607
|
-
const wither =
|
|
1797
|
+
const wither = G => f => self => _witherWithIndex_1(self)(G)((_, a) => f(a));
|
|
1608
1798
|
/**
|
|
1609
|
-
* @tsplus
|
|
1799
|
+
* @tsplus pipeable fncts.ImmutableArray zip
|
|
1610
1800
|
*/
|
|
1611
1801
|
|
|
1612
1802
|
|
|
1613
1803
|
exports.wither = wither;
|
|
1614
1804
|
|
|
1615
|
-
function
|
|
1616
|
-
return
|
|
1805
|
+
function zip(that) {
|
|
1806
|
+
return self => {
|
|
1807
|
+
return zipWith_1(that, _function.tuple)(self);
|
|
1808
|
+
};
|
|
1617
1809
|
}
|
|
1618
1810
|
/**
|
|
1619
|
-
* @tsplus
|
|
1811
|
+
* @tsplus pipeable fncts.ImmutableArray zipWith
|
|
1620
1812
|
*/
|
|
1621
1813
|
|
|
1622
1814
|
|
|
1623
|
-
function zipWith_1(
|
|
1624
|
-
|
|
1625
|
-
|
|
1815
|
+
function zipWith_1(fb, f) {
|
|
1816
|
+
return self => {
|
|
1817
|
+
const len = Math.min(tsplus_module_5.length(self), tsplus_module_5.length(fb));
|
|
1818
|
+
const fc = Array(len);
|
|
1626
1819
|
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1820
|
+
for (let i = 0; i < len; i++) {
|
|
1821
|
+
fc[i] = f(self._array[i], fb._array[i]);
|
|
1822
|
+
}
|
|
1630
1823
|
|
|
1631
|
-
|
|
1824
|
+
return tsplus_module_2.asImmutableArray(fc);
|
|
1825
|
+
};
|
|
1632
1826
|
}
|
|
1633
1827
|
//# sourceMappingURL=api.cjs.map
|