@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,59 +3,61 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.builder = exports.
|
|
6
|
+
exports._traverseWithIndex = exports._traverse = exports.ConcBuilder = void 0;
|
|
7
|
+
exports.align = align;
|
|
8
|
+
exports.builder = exports.append = exports.alignWith = void 0;
|
|
9
9
|
exports.chainRecBreadthFirst = chainRecBreadthFirst;
|
|
10
10
|
exports.chainRecDepthFirst = chainRecDepthFirst;
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
11
|
+
exports.chop = void 0;
|
|
12
|
+
exports.chunksOf = chunksOf;
|
|
13
|
+
exports.collectWhile = void 0;
|
|
14
14
|
exports.compact = compact;
|
|
15
|
-
exports.
|
|
15
|
+
exports.drop = exports.concat = void 0;
|
|
16
16
|
exports.dropUntil = dropUntil;
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
17
|
+
exports.dropWhile = dropWhile;
|
|
18
|
+
exports.elem = elem;
|
|
19
|
+
exports.exists = void 0;
|
|
20
|
+
exports.filter = filter;
|
|
21
|
+
exports.filterWithIndex = exports.filterMapWithIndex = exports.filterMap = void 0;
|
|
22
|
+
exports.find = find;
|
|
23
|
+
exports.flatMap = void 0;
|
|
24
24
|
exports.flatten = flatten;
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
25
|
+
exports.foldLeft = void 0;
|
|
26
|
+
exports.foldLeftWhile = foldLeftWhile;
|
|
27
|
+
exports.foldLeftWithIndex = void 0;
|
|
28
|
+
exports.foldMap = foldMap;
|
|
29
|
+
exports.foldMapWithIndex = void 0;
|
|
30
|
+
exports.foldRight = foldRight;
|
|
31
|
+
exports.forEach = exports.foldRightWithIndex = void 0;
|
|
32
|
+
exports.forEachWithIndex = forEachWithIndex;
|
|
33
|
+
exports.get = get;
|
|
33
34
|
exports.head = head;
|
|
34
35
|
exports.init = init;
|
|
35
36
|
exports.isNonEmpty = exports.isEmpty = void 0;
|
|
36
|
-
exports.
|
|
37
|
+
exports.join = join;
|
|
37
38
|
exports.last = last;
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
39
|
+
exports.map = map;
|
|
40
|
+
exports.mapAccum = mapAccum;
|
|
41
|
+
exports.mapWithIndex = void 0;
|
|
42
|
+
exports.partition = partition;
|
|
43
|
+
exports.partitionWithIndex = exports.partitionMapWithIndex = exports.partitionMap = void 0;
|
|
44
|
+
exports.prepend = prepend;
|
|
44
45
|
exports.reverse = reverse;
|
|
45
46
|
exports.separate = separate;
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
47
|
+
exports.splitAt = void 0;
|
|
48
|
+
exports.splitWhere = splitWhere;
|
|
48
49
|
exports.tail = tail;
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
50
|
+
exports.take = void 0;
|
|
51
|
+
exports.takeWhile = takeWhile;
|
|
51
52
|
exports.toBuffer = toBuffer;
|
|
52
53
|
exports.traverseWithIndex = exports.traverse = void 0;
|
|
53
54
|
exports.unfold = unfold;
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
55
|
+
exports.unsafeUpdateAt = exports.unsafeTail = exports.unsafeHead = exports.unsafeGet = void 0;
|
|
56
|
+
exports.updateAt = updateAt;
|
|
57
|
+
exports.zip = zip;
|
|
58
|
+
exports.zipWith = void 0;
|
|
56
59
|
exports.zipWithIndex = zipWithIndex;
|
|
57
|
-
exports.
|
|
58
|
-
exports.zip_ = zip_;
|
|
60
|
+
exports.zipWithIndexOffset = void 0;
|
|
59
61
|
|
|
60
62
|
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/These/constructors"));
|
|
61
63
|
|
|
@@ -75,129 +77,135 @@ var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require
|
|
|
75
77
|
|
|
76
78
|
var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/Iterable/constructors"));
|
|
77
79
|
|
|
78
|
-
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
80
|
+
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/function/api"));
|
|
79
81
|
|
|
80
|
-
var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/
|
|
81
|
-
|
|
82
|
-
var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/exceptions"));
|
|
82
|
+
var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/exceptions"));
|
|
83
83
|
|
|
84
84
|
var _definition2 = /*#__PURE__*/require("@fncts/base/collection/immutable/Conc/definition");
|
|
85
85
|
|
|
86
86
|
var _function = /*#__PURE__*/require("@fncts/base/data/function");
|
|
87
87
|
|
|
88
|
-
var P = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/typeclass"));
|
|
89
|
-
|
|
90
88
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
91
89
|
|
|
92
90
|
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; }
|
|
93
91
|
|
|
94
|
-
const
|
|
95
|
-
exports.
|
|
96
|
-
const
|
|
97
|
-
exports.
|
|
92
|
+
const alignWith = alignWith_1;
|
|
93
|
+
exports.alignWith = alignWith;
|
|
94
|
+
const append = append_1;
|
|
95
|
+
exports.append = append;
|
|
98
96
|
const builder = builder_1;
|
|
99
97
|
exports.builder = builder;
|
|
100
|
-
const
|
|
101
|
-
exports.
|
|
102
|
-
const
|
|
103
|
-
exports.
|
|
104
|
-
const
|
|
105
|
-
exports.
|
|
106
|
-
const
|
|
107
|
-
exports.
|
|
108
|
-
const
|
|
109
|
-
exports.
|
|
110
|
-
const
|
|
111
|
-
exports.
|
|
112
|
-
const
|
|
113
|
-
exports.
|
|
114
|
-
const
|
|
115
|
-
exports.
|
|
116
|
-
const
|
|
117
|
-
exports.
|
|
118
|
-
const
|
|
119
|
-
exports.
|
|
120
|
-
const
|
|
121
|
-
exports.
|
|
122
|
-
const
|
|
123
|
-
exports.
|
|
124
|
-
const
|
|
125
|
-
exports.
|
|
126
|
-
const
|
|
127
|
-
exports.
|
|
128
|
-
const
|
|
129
|
-
exports.
|
|
98
|
+
const flatMap = flatMap_1;
|
|
99
|
+
exports.flatMap = flatMap;
|
|
100
|
+
const chop = chop_1;
|
|
101
|
+
exports.chop = chop;
|
|
102
|
+
const collectWhile = collectWhile_1;
|
|
103
|
+
exports.collectWhile = collectWhile;
|
|
104
|
+
const concat = concat_1;
|
|
105
|
+
exports.concat = concat;
|
|
106
|
+
const exists = exists_1;
|
|
107
|
+
exports.exists = exists;
|
|
108
|
+
const drop = drop_1;
|
|
109
|
+
exports.drop = drop;
|
|
110
|
+
const filterMap = filterMap_1;
|
|
111
|
+
exports.filterMap = filterMap;
|
|
112
|
+
const filterMapWithIndex = filterMapWithIndex_1;
|
|
113
|
+
exports.filterMapWithIndex = filterMapWithIndex;
|
|
114
|
+
const filterWithIndex = filterWithIndex_1;
|
|
115
|
+
exports.filterWithIndex = filterWithIndex;
|
|
116
|
+
const foldLeft = foldLeft_1;
|
|
117
|
+
exports.foldLeft = foldLeft;
|
|
118
|
+
const foldLeftWithIndex = foldLeftWithIndex_1;
|
|
119
|
+
exports.foldLeftWithIndex = foldLeftWithIndex;
|
|
120
|
+
const foldMapWithIndex = foldMapWithIndex_1;
|
|
121
|
+
exports.foldMapWithIndex = foldMapWithIndex;
|
|
122
|
+
const foldRightWithIndex = foldRightWithIndex_1;
|
|
123
|
+
exports.foldRightWithIndex = foldRightWithIndex;
|
|
124
|
+
const forEach = forEach_1;
|
|
125
|
+
exports.forEach = forEach;
|
|
126
|
+
const mapWithIndex = mapWithIndex_1;
|
|
127
|
+
exports.mapWithIndex = mapWithIndex;
|
|
130
128
|
const isEmpty = isEmpty_1;
|
|
131
129
|
exports.isEmpty = isEmpty;
|
|
132
130
|
const isNonEmpty = isNonEmpty_1;
|
|
133
131
|
exports.isNonEmpty = isNonEmpty;
|
|
134
|
-
const
|
|
135
|
-
exports.
|
|
136
|
-
const
|
|
137
|
-
exports.
|
|
138
|
-
const
|
|
139
|
-
exports.
|
|
140
|
-
const
|
|
141
|
-
exports.
|
|
142
|
-
const
|
|
143
|
-
exports.
|
|
144
|
-
const
|
|
145
|
-
exports.
|
|
132
|
+
const partitionMap = partitionMap_1;
|
|
133
|
+
exports.partitionMap = partitionMap;
|
|
134
|
+
const partitionMapWithIndex = partitionMapWithIndex_1;
|
|
135
|
+
exports.partitionMapWithIndex = partitionMapWithIndex;
|
|
136
|
+
const partitionWithIndex = partitionWithIndex_1;
|
|
137
|
+
exports.partitionWithIndex = partitionWithIndex;
|
|
138
|
+
const splitAt = splitAt_1;
|
|
139
|
+
exports.splitAt = splitAt;
|
|
140
|
+
const take = take_1;
|
|
141
|
+
exports.take = take;
|
|
142
|
+
const _traverseWithIndex = _traverseWithIndex_1;
|
|
143
|
+
exports._traverseWithIndex = _traverseWithIndex;
|
|
144
|
+
const _traverse = _traverse_1;
|
|
145
|
+
exports._traverse = _traverse;
|
|
146
|
+
const unsafeGet = unsafeGet_1;
|
|
147
|
+
exports.unsafeGet = unsafeGet;
|
|
146
148
|
const unsafeHead = unsafeHead_1;
|
|
147
149
|
exports.unsafeHead = unsafeHead;
|
|
148
150
|
const unsafeTail = unsafeTail_1;
|
|
149
151
|
exports.unsafeTail = unsafeTail;
|
|
150
|
-
const
|
|
151
|
-
exports.
|
|
152
|
-
const
|
|
153
|
-
exports.
|
|
154
|
-
const
|
|
155
|
-
exports.
|
|
152
|
+
const unsafeUpdateAt = unsafeUpdateAt_1;
|
|
153
|
+
exports.unsafeUpdateAt = unsafeUpdateAt;
|
|
154
|
+
const zipWith = zipWith_1;
|
|
155
|
+
exports.zipWith = zipWith;
|
|
156
|
+
const zipWithIndexOffset = zipWithIndexOffset_1;
|
|
157
|
+
exports.zipWithIndexOffset = zipWithIndexOffset;
|
|
156
158
|
|
|
157
159
|
/**
|
|
158
|
-
* @tsplus
|
|
160
|
+
* @tsplus pipeable fncts.Conc align
|
|
159
161
|
*/
|
|
160
|
-
function
|
|
161
|
-
return
|
|
162
|
+
function align(fb) {
|
|
163
|
+
return self => {
|
|
164
|
+
return alignWith_1(fb, _function.identity)(self);
|
|
165
|
+
};
|
|
162
166
|
}
|
|
163
167
|
/**
|
|
164
|
-
* @tsplus
|
|
168
|
+
* @tsplus pipeable fncts.Conc alignWith
|
|
165
169
|
*/
|
|
166
170
|
|
|
167
171
|
|
|
168
|
-
function alignWith_1(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
for (let i = 0; i < minlen; i++) {
|
|
176
|
-
out.append(f(tsplus_module_1.both(self.get(i), fb.get(i))));
|
|
177
|
-
}
|
|
172
|
+
function alignWith_1(fb, f) {
|
|
173
|
+
return self => {
|
|
174
|
+
void 0;
|
|
175
|
+
void 0;
|
|
176
|
+
const out = builder_1();
|
|
177
|
+
const minlen = Math.min(self.length, fb.length);
|
|
178
|
+
const maxlen = Math.max(self.length, fb.length);
|
|
178
179
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
} else if (self.length > fb.length) {
|
|
182
|
-
for (let i = minlen; i < maxlen; i++) {
|
|
183
|
-
out.append(f(tsplus_module_1.left(self.get(i))));
|
|
180
|
+
for (let i = 0; i < minlen; i++) {
|
|
181
|
+
out.append(f(tsplus_module_1.both(self.get(i), fb.get(i))));
|
|
184
182
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
out.
|
|
183
|
+
|
|
184
|
+
if (minlen === maxlen) {
|
|
185
|
+
return out.result();
|
|
186
|
+
} else if (self.length > fb.length) {
|
|
187
|
+
for (let i = minlen; i < maxlen; i++) {
|
|
188
|
+
out.append(f(tsplus_module_1.left(self.get(i))));
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
for (let i = minlen; i < maxlen; i++) {
|
|
192
|
+
out.append(f(tsplus_module_1.right(fb.get(i))));
|
|
193
|
+
}
|
|
188
194
|
}
|
|
189
|
-
}
|
|
190
195
|
|
|
191
|
-
|
|
196
|
+
return out.result();
|
|
197
|
+
};
|
|
192
198
|
}
|
|
193
199
|
/**
|
|
194
|
-
* @tsplus
|
|
200
|
+
* @tsplus pipeable fncts.Conc append
|
|
195
201
|
*/
|
|
196
202
|
|
|
197
203
|
|
|
198
|
-
function append_1(
|
|
199
|
-
|
|
200
|
-
|
|
204
|
+
function append_1(a) {
|
|
205
|
+
return self => {
|
|
206
|
+
void 0;
|
|
207
|
+
return self.append(a);
|
|
208
|
+
};
|
|
201
209
|
}
|
|
202
210
|
|
|
203
211
|
class ConcBuilder {
|
|
@@ -206,7 +214,7 @@ class ConcBuilder {
|
|
|
206
214
|
}
|
|
207
215
|
|
|
208
216
|
append(a) {
|
|
209
|
-
this.conc = append_1(this.conc
|
|
217
|
+
this.conc = append_1(a)(this.conc);
|
|
210
218
|
return this;
|
|
211
219
|
}
|
|
212
220
|
|
|
@@ -226,27 +234,29 @@ function builder_1() {
|
|
|
226
234
|
return new ConcBuilder(tsplus_module_2.empty());
|
|
227
235
|
}
|
|
228
236
|
/**
|
|
229
|
-
* @tsplus
|
|
237
|
+
* @tsplus pipeable fncts.Conc flatMap
|
|
230
238
|
*/
|
|
231
239
|
|
|
232
240
|
|
|
233
|
-
function flatMap_1(
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
241
|
+
function flatMap_1(f) {
|
|
242
|
+
return ma => {
|
|
243
|
+
void 0;
|
|
244
|
+
const iterator = ma.arrayIterator();
|
|
245
|
+
let result;
|
|
246
|
+
let out = tsplus_module_2.empty();
|
|
238
247
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
248
|
+
while (!(result = iterator.next()).done) {
|
|
249
|
+
const arr = result.value;
|
|
250
|
+
const length = arr.length;
|
|
242
251
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
252
|
+
for (let i = 0; i < length; i++) {
|
|
253
|
+
const a = arr[i];
|
|
254
|
+
out = concat_1(f(a))(out);
|
|
255
|
+
}
|
|
246
256
|
}
|
|
247
|
-
}
|
|
248
257
|
|
|
249
|
-
|
|
258
|
+
return out;
|
|
259
|
+
};
|
|
250
260
|
}
|
|
251
261
|
/**
|
|
252
262
|
* @tsplus static fncts.ConcOps chainRecDepthFirst
|
|
@@ -265,9 +275,9 @@ function chainRecDepthFirst(a, f) {
|
|
|
265
275
|
if (e._tag === "Left"
|
|
266
276
|
/* EitherTag.Left */
|
|
267
277
|
) {
|
|
268
|
-
buffer = concat_1(f(e.left)
|
|
278
|
+
buffer = concat_1(buffer)(f(e.left));
|
|
269
279
|
} else {
|
|
270
|
-
out = append_1(
|
|
280
|
+
out = append_1(e.right)(out);
|
|
271
281
|
}
|
|
272
282
|
}
|
|
273
283
|
|
|
@@ -289,9 +299,9 @@ function chainRecBreadthFirst(a, f) {
|
|
|
289
299
|
if (e._tag === "Left"
|
|
290
300
|
/* EitherTag.Left */
|
|
291
301
|
) {
|
|
292
|
-
forEach_1(
|
|
302
|
+
forEach_1(ab => (buffer = append_1(ab)(buffer), undefined))(f(e.left));
|
|
293
303
|
} else {
|
|
294
|
-
out = append_1(
|
|
304
|
+
out = append_1(e.right)(out);
|
|
295
305
|
}
|
|
296
306
|
}
|
|
297
307
|
|
|
@@ -308,73 +318,79 @@ function chainRecBreadthFirst(a, f) {
|
|
|
308
318
|
return out;
|
|
309
319
|
}
|
|
310
320
|
/**
|
|
311
|
-
* @tsplus
|
|
321
|
+
* @tsplus pipeable fncts.Conc chop
|
|
312
322
|
*/
|
|
313
323
|
|
|
314
324
|
|
|
315
|
-
function chop_1(
|
|
316
|
-
|
|
317
|
-
|
|
325
|
+
function chop_1(f) {
|
|
326
|
+
return self => {
|
|
327
|
+
const out = builder_1();
|
|
328
|
+
let cs = self;
|
|
318
329
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
330
|
+
while (isNonEmpty_1(cs)) {
|
|
331
|
+
const [b, c] = f(cs);
|
|
332
|
+
out.append(b);
|
|
333
|
+
cs = c;
|
|
334
|
+
}
|
|
324
335
|
|
|
325
|
-
|
|
336
|
+
return out.result();
|
|
337
|
+
};
|
|
326
338
|
}
|
|
327
339
|
/**
|
|
328
|
-
* @tsplus
|
|
340
|
+
* @tsplus pipeable fncts.Conc chunksOf
|
|
329
341
|
*/
|
|
330
342
|
|
|
331
343
|
|
|
332
|
-
function
|
|
333
|
-
return
|
|
344
|
+
function chunksOf(n) {
|
|
345
|
+
return self => {
|
|
346
|
+
return chop_1(as => splitAt_1(n)(as))(self);
|
|
347
|
+
};
|
|
334
348
|
}
|
|
335
349
|
/**
|
|
336
350
|
* Transforms all elements of the Conc for as long as the specified partial function is defined.
|
|
337
351
|
*
|
|
338
|
-
* @tsplus
|
|
352
|
+
* @tsplus pipeable fncts.Conc collectWhile
|
|
339
353
|
*/
|
|
340
354
|
|
|
341
355
|
|
|
342
|
-
function collectWhile_1(
|
|
343
|
-
|
|
356
|
+
function collectWhile_1(f) {
|
|
357
|
+
return as => {
|
|
358
|
+
void 0;
|
|
344
359
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
360
|
+
switch (as._tag) {
|
|
361
|
+
case "Singleton"
|
|
362
|
+
/* ConcTag.Singleton */
|
|
363
|
+
:
|
|
364
|
+
{
|
|
365
|
+
return tsplus_module_4.match(() => tsplus_module_2.empty(), tsplus_module_3.single)(f(as.value));
|
|
366
|
+
}
|
|
352
367
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
368
|
+
case "Chunk"
|
|
369
|
+
/* ConcTag.Chunk */
|
|
370
|
+
:
|
|
371
|
+
{
|
|
372
|
+
const array = as.arrayLike();
|
|
373
|
+
let dest = tsplus_module_2.empty();
|
|
359
374
|
|
|
360
|
-
|
|
361
|
-
|
|
375
|
+
for (let i = 0; i < array.length; i++) {
|
|
376
|
+
const rhs = f(array[i]);
|
|
362
377
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
378
|
+
if (tsplus_module_5.isJust(rhs)) {
|
|
379
|
+
dest = append_1(rhs.value)(dest);
|
|
380
|
+
} else {
|
|
381
|
+
return dest;
|
|
382
|
+
}
|
|
367
383
|
}
|
|
368
|
-
}
|
|
369
384
|
|
|
370
|
-
|
|
371
|
-
|
|
385
|
+
return dest;
|
|
386
|
+
}
|
|
372
387
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
388
|
+
default:
|
|
389
|
+
{
|
|
390
|
+
return collectWhile_1(f)(as.materialize());
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
};
|
|
378
394
|
}
|
|
379
395
|
/**
|
|
380
396
|
* @tsplus getter fncts.Conc compact
|
|
@@ -382,283 +398,305 @@ function collectWhile_1(as, f) {
|
|
|
382
398
|
|
|
383
399
|
|
|
384
400
|
function compact(self) {
|
|
385
|
-
return filterMap_1(
|
|
401
|
+
return filterMap_1(_function.identity)(self);
|
|
386
402
|
}
|
|
387
403
|
/**
|
|
388
|
-
* @tsplus
|
|
404
|
+
* @tsplus pipeable fncts.Conc concat
|
|
389
405
|
*/
|
|
390
406
|
|
|
391
407
|
|
|
392
|
-
function concat_1(
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
408
|
+
function concat_1(that) {
|
|
409
|
+
return self => {
|
|
410
|
+
void 0;
|
|
411
|
+
void 0;
|
|
412
|
+
return self.concat(that);
|
|
413
|
+
};
|
|
396
414
|
}
|
|
397
415
|
/**
|
|
398
|
-
* @tsplus
|
|
416
|
+
* @tsplus pipeable fncts.Conc elem
|
|
399
417
|
*/
|
|
400
418
|
|
|
401
419
|
|
|
402
|
-
function
|
|
420
|
+
function elem(a,
|
|
403
421
|
/** @tsplus auto */
|
|
404
422
|
E) {
|
|
405
|
-
return
|
|
423
|
+
return self => {
|
|
424
|
+
return exists_1(el => E.equals(el, a))(self);
|
|
425
|
+
};
|
|
406
426
|
}
|
|
407
427
|
/**
|
|
408
|
-
* @tsplus
|
|
428
|
+
* @tsplus pipeable fncts.Conc exists
|
|
409
429
|
*/
|
|
410
430
|
|
|
411
431
|
|
|
412
|
-
function exists_1(
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
432
|
+
function exists_1(predicate) {
|
|
433
|
+
return as => {
|
|
434
|
+
void 0;
|
|
435
|
+
const iterator = as.arrayIterator();
|
|
436
|
+
let exists = false;
|
|
437
|
+
let result;
|
|
417
438
|
|
|
418
|
-
|
|
419
|
-
|
|
439
|
+
while (!exists && !(result = iterator.next()).done) {
|
|
440
|
+
const array = result.value;
|
|
420
441
|
|
|
421
|
-
|
|
422
|
-
|
|
442
|
+
for (let i = 0; !exists && i < array.length; i++) {
|
|
443
|
+
exists = predicate(array[i]);
|
|
444
|
+
}
|
|
423
445
|
}
|
|
424
|
-
}
|
|
425
446
|
|
|
426
|
-
|
|
447
|
+
return exists;
|
|
448
|
+
};
|
|
427
449
|
}
|
|
428
450
|
/**
|
|
429
|
-
* @tsplus
|
|
451
|
+
* @tsplus pipeable fncts.Conc drop
|
|
430
452
|
*/
|
|
431
453
|
|
|
432
454
|
|
|
433
|
-
function drop_1(
|
|
434
|
-
|
|
435
|
-
|
|
455
|
+
function drop_1(n) {
|
|
456
|
+
return self => {
|
|
457
|
+
void 0;
|
|
458
|
+
const len = self.length;
|
|
436
459
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
460
|
+
if (len <= 0) {
|
|
461
|
+
return self;
|
|
462
|
+
} else if (n >= len) {
|
|
463
|
+
return tsplus_module_2.empty();
|
|
464
|
+
} else {
|
|
465
|
+
switch (self._tag) {
|
|
466
|
+
case "Slice"
|
|
467
|
+
/* ConcTag.Slice */
|
|
468
|
+
:
|
|
469
|
+
return new _definition2.Slice(self.conc, self.offset + n, self.l - n);
|
|
447
470
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
471
|
+
case "Singleton"
|
|
472
|
+
/* ConcTag.Singleton */
|
|
473
|
+
:
|
|
474
|
+
return n > 0 ? tsplus_module_2.empty() : self;
|
|
452
475
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
476
|
+
case "Empty"
|
|
477
|
+
/* ConcTag.Empty */
|
|
478
|
+
:
|
|
479
|
+
return tsplus_module_2.empty();
|
|
457
480
|
|
|
458
|
-
|
|
459
|
-
|
|
481
|
+
default:
|
|
482
|
+
return new _definition2.Slice(self, n, len - n);
|
|
483
|
+
}
|
|
460
484
|
}
|
|
461
|
-
}
|
|
485
|
+
};
|
|
462
486
|
}
|
|
463
487
|
/**
|
|
464
|
-
* @tsplus
|
|
488
|
+
* @tsplus pipeable fncts.Conc dropUntil
|
|
465
489
|
*/
|
|
466
490
|
|
|
467
491
|
|
|
468
|
-
function dropUntil(
|
|
469
|
-
|
|
470
|
-
|
|
492
|
+
function dropUntil(p) {
|
|
493
|
+
return self => {
|
|
494
|
+
let cont = true;
|
|
495
|
+
let i = 0;
|
|
471
496
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
497
|
+
for (const elem of self) {
|
|
498
|
+
if (!cont) {
|
|
499
|
+
break;
|
|
500
|
+
}
|
|
476
501
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
502
|
+
i++;
|
|
503
|
+
cont = !p(elem);
|
|
504
|
+
}
|
|
480
505
|
|
|
481
|
-
|
|
506
|
+
return drop_1(i)(self);
|
|
507
|
+
};
|
|
482
508
|
}
|
|
483
509
|
/**
|
|
484
|
-
* @tsplus
|
|
510
|
+
* @tsplus pipeable fncts.Conc dropWhile
|
|
485
511
|
*/
|
|
486
512
|
|
|
487
513
|
|
|
488
|
-
function
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
switch (self._tag) {
|
|
492
|
-
case "Chunk"
|
|
493
|
-
/* ConcTag.Chunk */
|
|
494
|
-
:
|
|
495
|
-
{
|
|
496
|
-
const arr = self.arrayLike();
|
|
497
|
-
let i = 0;
|
|
498
|
-
|
|
499
|
-
while (i < arr.length && p(arr[i])) {
|
|
500
|
-
i++;
|
|
501
|
-
}
|
|
514
|
+
function dropWhile(p) {
|
|
515
|
+
return self => {
|
|
516
|
+
void 0;
|
|
502
517
|
|
|
503
|
-
|
|
504
|
-
|
|
518
|
+
switch (self._tag) {
|
|
519
|
+
case "Chunk"
|
|
520
|
+
/* ConcTag.Chunk */
|
|
521
|
+
:
|
|
522
|
+
{
|
|
523
|
+
const arr = self.arrayLike();
|
|
524
|
+
let i = 0;
|
|
505
525
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
let result;
|
|
510
|
-
let cont = true;
|
|
511
|
-
let i = 0;
|
|
526
|
+
while (i < arr.length && p(arr[i])) {
|
|
527
|
+
i++;
|
|
528
|
+
}
|
|
512
529
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
let j = 0;
|
|
530
|
+
return drop_1(i)(self);
|
|
531
|
+
}
|
|
516
532
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
533
|
+
default:
|
|
534
|
+
{
|
|
535
|
+
const iterator = self.arrayIterator();
|
|
536
|
+
let result;
|
|
537
|
+
let cont = true;
|
|
538
|
+
let i = 0;
|
|
539
|
+
|
|
540
|
+
while (cont && !(result = iterator.next()).done) {
|
|
541
|
+
const array = result.value;
|
|
542
|
+
let j = 0;
|
|
543
|
+
|
|
544
|
+
while (cont && j < array.length) {
|
|
545
|
+
if (p(array[j])) {
|
|
546
|
+
i++;
|
|
547
|
+
j++;
|
|
548
|
+
} else {
|
|
549
|
+
cont = false;
|
|
550
|
+
}
|
|
523
551
|
}
|
|
524
552
|
}
|
|
525
|
-
}
|
|
526
553
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
554
|
+
return drop_1(i)(self);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
};
|
|
530
558
|
}
|
|
531
559
|
|
|
532
|
-
function
|
|
533
|
-
return
|
|
560
|
+
function filter(p) {
|
|
561
|
+
return self => {
|
|
562
|
+
return filterWithIndex_1((_, a) => p(a))(self);
|
|
563
|
+
};
|
|
534
564
|
}
|
|
535
565
|
/**
|
|
536
|
-
* @tsplus
|
|
566
|
+
* @tsplus pipeable fncts.Conc filterMap
|
|
537
567
|
*/
|
|
538
568
|
|
|
539
569
|
|
|
540
|
-
function filterMap_1(
|
|
541
|
-
return
|
|
570
|
+
function filterMap_1(f) {
|
|
571
|
+
return self => {
|
|
572
|
+
return filterMapWithIndex_1((_, a) => f(a))(self);
|
|
573
|
+
};
|
|
542
574
|
}
|
|
543
575
|
/**
|
|
544
|
-
* @tsplus
|
|
576
|
+
* @tsplus pipeable fncts.Conc filterMapWithIndex
|
|
545
577
|
*/
|
|
546
578
|
|
|
547
579
|
|
|
548
|
-
function filterMapWithIndex_1(
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
580
|
+
function filterMapWithIndex_1(f) {
|
|
581
|
+
return self => {
|
|
582
|
+
void 0;
|
|
583
|
+
const iterator = self.arrayIterator();
|
|
584
|
+
const out = builder_1();
|
|
585
|
+
let result;
|
|
586
|
+
let i = 0;
|
|
554
587
|
|
|
555
|
-
|
|
556
|
-
|
|
588
|
+
while (!(result = iterator.next()).done) {
|
|
589
|
+
const array = result.value;
|
|
557
590
|
|
|
558
|
-
|
|
559
|
-
|
|
591
|
+
for (let j = 0; j < array.length; j++) {
|
|
592
|
+
const ob = f(i, array[j]);
|
|
560
593
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
594
|
+
if (tsplus_module_5.isJust(ob)) {
|
|
595
|
+
out.append(ob.value);
|
|
596
|
+
}
|
|
564
597
|
|
|
565
|
-
|
|
598
|
+
i++;
|
|
599
|
+
}
|
|
566
600
|
}
|
|
567
|
-
}
|
|
568
601
|
|
|
569
|
-
|
|
602
|
+
return out.result();
|
|
603
|
+
};
|
|
570
604
|
}
|
|
571
605
|
|
|
572
|
-
function filterWithIndex_1(
|
|
573
|
-
|
|
606
|
+
function filterWithIndex_1(p) {
|
|
607
|
+
return self => {
|
|
608
|
+
void 0;
|
|
574
609
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
610
|
+
switch (self._tag) {
|
|
611
|
+
case "Empty"
|
|
612
|
+
/* ConcTag.Empty */
|
|
613
|
+
:
|
|
614
|
+
{
|
|
615
|
+
return _definition2._Empty;
|
|
616
|
+
}
|
|
582
617
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
618
|
+
case "Chunk"
|
|
619
|
+
/* ConcTag.Chunk */
|
|
620
|
+
:
|
|
621
|
+
{
|
|
622
|
+
const arr = self.arrayLike();
|
|
623
|
+
let builder = tsplus_module_2.empty();
|
|
589
624
|
|
|
590
|
-
|
|
591
|
-
|
|
625
|
+
for (let i = 0; i < arr.length; i++) {
|
|
626
|
+
const a = arr[i];
|
|
592
627
|
|
|
593
|
-
|
|
594
|
-
|
|
628
|
+
if (p(i, a)) {
|
|
629
|
+
builder = append_1(a)(builder);
|
|
630
|
+
}
|
|
595
631
|
}
|
|
632
|
+
|
|
633
|
+
return builder;
|
|
596
634
|
}
|
|
597
635
|
|
|
598
|
-
|
|
599
|
-
|
|
636
|
+
case "Singleton"
|
|
637
|
+
/* ConcTag.Singleton */
|
|
638
|
+
:
|
|
639
|
+
{
|
|
640
|
+
if (p(0, self.value)) {
|
|
641
|
+
return self;
|
|
642
|
+
}
|
|
600
643
|
|
|
601
|
-
|
|
602
|
-
/* ConcTag.Singleton */
|
|
603
|
-
:
|
|
604
|
-
{
|
|
605
|
-
if (p(0, self.value)) {
|
|
606
|
-
return self;
|
|
644
|
+
return _definition2._Empty;
|
|
607
645
|
}
|
|
608
646
|
|
|
609
|
-
|
|
610
|
-
|
|
647
|
+
default:
|
|
648
|
+
{
|
|
649
|
+
const iterator = self.arrayIterator();
|
|
650
|
+
let out = tsplus_module_2.empty();
|
|
651
|
+
let result;
|
|
652
|
+
let i = 0;
|
|
611
653
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
const iterator = self.arrayIterator();
|
|
615
|
-
let out = tsplus_module_2.empty();
|
|
616
|
-
let result;
|
|
617
|
-
let i = 0;
|
|
654
|
+
while (!(result = iterator.next()).done) {
|
|
655
|
+
const array = result.value;
|
|
618
656
|
|
|
619
|
-
|
|
620
|
-
|
|
657
|
+
for (let j = 0; j < array.length; j++) {
|
|
658
|
+
const a = array[j];
|
|
621
659
|
|
|
622
|
-
|
|
623
|
-
|
|
660
|
+
if (p(i, a)) {
|
|
661
|
+
out = append_1(a)(out);
|
|
662
|
+
}
|
|
624
663
|
|
|
625
|
-
|
|
626
|
-
out = append_1(out, a);
|
|
664
|
+
i++;
|
|
627
665
|
}
|
|
628
|
-
|
|
629
|
-
i++;
|
|
630
666
|
}
|
|
631
|
-
}
|
|
632
667
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
668
|
+
return out;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
};
|
|
636
672
|
}
|
|
637
673
|
/**
|
|
638
|
-
* @tsplus
|
|
674
|
+
* @tsplus pipeable fncts.Conc find
|
|
639
675
|
*/
|
|
640
676
|
|
|
641
677
|
|
|
642
|
-
function
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
678
|
+
function find(f) {
|
|
679
|
+
return self => {
|
|
680
|
+
void 0;
|
|
681
|
+
const iterator = self.arrayIterator();
|
|
682
|
+
let out = tsplus_module_6.nothing();
|
|
683
|
+
let result;
|
|
647
684
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
685
|
+
while (tsplus_module_5.isNothing(out) && !(result = iterator.next()).done) {
|
|
686
|
+
const array = result.value;
|
|
687
|
+
const length = array.length;
|
|
651
688
|
|
|
652
|
-
|
|
653
|
-
|
|
689
|
+
for (let i = 0; tsplus_module_5.isNothing(out) && i < length; i++) {
|
|
690
|
+
const a = array[i];
|
|
654
691
|
|
|
655
|
-
|
|
656
|
-
|
|
692
|
+
if (f(a)) {
|
|
693
|
+
out = tsplus_module_6.just(a);
|
|
694
|
+
}
|
|
657
695
|
}
|
|
658
696
|
}
|
|
659
|
-
}
|
|
660
697
|
|
|
661
|
-
|
|
698
|
+
return out;
|
|
699
|
+
};
|
|
662
700
|
}
|
|
663
701
|
/**
|
|
664
702
|
* @tsplus getter fncts.Conc flatten
|
|
@@ -666,141 +704,161 @@ function find_(self, f) {
|
|
|
666
704
|
|
|
667
705
|
|
|
668
706
|
function flatten(self) {
|
|
669
|
-
return flatMap_1(
|
|
707
|
+
return flatMap_1(_function.identity)(self);
|
|
670
708
|
}
|
|
671
709
|
/**
|
|
672
710
|
* Folds over the elements in this Conc from the left.
|
|
673
711
|
* Stops the fold early when the condition is not fulfilled.
|
|
674
712
|
*
|
|
675
|
-
* @tsplus
|
|
713
|
+
* @tsplus pipeable fncts.Conc foldLeftWhile
|
|
676
714
|
*/
|
|
677
715
|
|
|
678
716
|
|
|
679
|
-
function
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
717
|
+
function foldLeftWhile(b, p, f) {
|
|
718
|
+
return as => {
|
|
719
|
+
void 0;
|
|
720
|
+
const iterator = as.arrayIterator();
|
|
721
|
+
let s = b;
|
|
722
|
+
let cont = p(s);
|
|
723
|
+
let result;
|
|
685
724
|
|
|
686
|
-
|
|
687
|
-
|
|
725
|
+
while (cont && !(result = iterator.next()).done) {
|
|
726
|
+
const array = result.value;
|
|
688
727
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
728
|
+
for (let i = 0; cont && i < array.length; i++) {
|
|
729
|
+
s = f(s, array[i]);
|
|
730
|
+
cont = p(s);
|
|
731
|
+
}
|
|
692
732
|
}
|
|
693
|
-
}
|
|
694
733
|
|
|
695
|
-
|
|
734
|
+
return s;
|
|
735
|
+
};
|
|
696
736
|
}
|
|
697
737
|
/**
|
|
698
|
-
* @tsplus
|
|
738
|
+
* @tsplus pipeable fncts.Conc foldLeft
|
|
699
739
|
*/
|
|
700
740
|
|
|
701
741
|
|
|
702
|
-
function foldLeft_1(
|
|
703
|
-
return
|
|
742
|
+
function foldLeft_1(b, f) {
|
|
743
|
+
return self => {
|
|
744
|
+
return foldLeftWithIndex_1(b, (_, b, a) => f(b, a))(self);
|
|
745
|
+
};
|
|
704
746
|
}
|
|
705
747
|
/**
|
|
706
|
-
* @tsplus
|
|
748
|
+
* @tsplus pipeable fncts.Conc foldLeftWithIndex
|
|
707
749
|
*/
|
|
708
750
|
|
|
709
751
|
|
|
710
|
-
function foldLeftWithIndex_1(
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
752
|
+
function foldLeftWithIndex_1(b, f) {
|
|
753
|
+
return self => {
|
|
754
|
+
void 0;
|
|
755
|
+
const iterator = self.arrayIterator();
|
|
756
|
+
let out = b;
|
|
757
|
+
let result;
|
|
758
|
+
let i = 0;
|
|
716
759
|
|
|
717
|
-
|
|
718
|
-
|
|
760
|
+
while (!(result = iterator.next()).done) {
|
|
761
|
+
const array = result.value;
|
|
719
762
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
763
|
+
for (let j = 0; j < array.length; j++) {
|
|
764
|
+
out = f(i, out, array[j]);
|
|
765
|
+
i++;
|
|
766
|
+
}
|
|
723
767
|
}
|
|
724
|
-
}
|
|
725
768
|
|
|
726
|
-
|
|
769
|
+
return out;
|
|
770
|
+
};
|
|
727
771
|
}
|
|
728
772
|
/**
|
|
729
|
-
* @tsplus
|
|
773
|
+
* @tsplus pipeable fncts.Conc foldMap
|
|
730
774
|
*/
|
|
731
775
|
|
|
732
776
|
|
|
733
|
-
function
|
|
777
|
+
function foldMap(f,
|
|
734
778
|
/** @tsplus auto */
|
|
735
779
|
M) {
|
|
736
|
-
return
|
|
780
|
+
return fa => {
|
|
781
|
+
return foldMapWithIndex_1((_, a) => f(a), M)(fa);
|
|
782
|
+
};
|
|
737
783
|
}
|
|
738
784
|
/**
|
|
739
|
-
* @tsplus
|
|
785
|
+
* @tsplus pipeable fncts.Conc foldMapWithIndex
|
|
740
786
|
*/
|
|
741
787
|
|
|
742
788
|
|
|
743
|
-
function foldMapWithIndex_1(
|
|
789
|
+
function foldMapWithIndex_1(f,
|
|
744
790
|
/** @tsplus auto */
|
|
745
791
|
M) {
|
|
746
|
-
return
|
|
792
|
+
return fa => {
|
|
793
|
+
return foldLeftWithIndex_1(M.nat, (i, b, a) => M.combine(b, f(i, a)))(fa);
|
|
794
|
+
};
|
|
747
795
|
}
|
|
748
796
|
/**
|
|
749
|
-
* @tsplus
|
|
797
|
+
* @tsplus pipeable fncts.Conc foldRight
|
|
750
798
|
*/
|
|
751
799
|
|
|
752
800
|
|
|
753
|
-
function
|
|
754
|
-
return
|
|
801
|
+
function foldRight(b, f) {
|
|
802
|
+
return fa => {
|
|
803
|
+
return foldRightWithIndex_1(b, (_, a, b) => f(a, b))(fa);
|
|
804
|
+
};
|
|
755
805
|
}
|
|
756
806
|
/**
|
|
757
|
-
* @tsplus
|
|
807
|
+
* @tsplus pipeable fncts.Conc foldRightWithIndex
|
|
758
808
|
*/
|
|
759
809
|
|
|
760
810
|
|
|
761
|
-
function foldRightWithIndex_1(
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
811
|
+
function foldRightWithIndex_1(b, f) {
|
|
812
|
+
return self => {
|
|
813
|
+
void 0;
|
|
814
|
+
const iterator = self.reverseArrayIterator();
|
|
815
|
+
let out = b;
|
|
816
|
+
let result;
|
|
817
|
+
let i = self.length - 1;
|
|
767
818
|
|
|
768
|
-
|
|
769
|
-
|
|
819
|
+
while (!(result = iterator.next()).done) {
|
|
820
|
+
const array = result.value;
|
|
770
821
|
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
822
|
+
for (let j = array.length - 1; j >= 0; j--) {
|
|
823
|
+
out = f(i, array[i], out);
|
|
824
|
+
i--;
|
|
825
|
+
}
|
|
774
826
|
}
|
|
775
|
-
}
|
|
776
827
|
|
|
777
|
-
|
|
828
|
+
return out;
|
|
829
|
+
};
|
|
778
830
|
}
|
|
779
831
|
/**
|
|
780
|
-
* @tsplus
|
|
832
|
+
* @tsplus pipeable fncts.Conc forEach
|
|
781
833
|
*/
|
|
782
834
|
|
|
783
835
|
|
|
784
|
-
function forEach_1(
|
|
785
|
-
|
|
786
|
-
|
|
836
|
+
function forEach_1(f) {
|
|
837
|
+
return self => {
|
|
838
|
+
void 0;
|
|
839
|
+
return self.forEach(0, (_, a) => f(a));
|
|
840
|
+
};
|
|
787
841
|
}
|
|
788
842
|
/**
|
|
789
|
-
* @tsplus
|
|
843
|
+
* @tsplus pipeable fncts.Conc forEachWithIndex
|
|
790
844
|
*/
|
|
791
845
|
|
|
792
846
|
|
|
793
|
-
function
|
|
794
|
-
|
|
795
|
-
|
|
847
|
+
function forEachWithIndex(f) {
|
|
848
|
+
return self => {
|
|
849
|
+
void 0;
|
|
850
|
+
self.forEach(0, f);
|
|
851
|
+
};
|
|
796
852
|
}
|
|
797
853
|
/**
|
|
798
|
-
* @tsplus
|
|
854
|
+
* @tsplus pipeable fncts.Conc get
|
|
799
855
|
*/
|
|
800
856
|
|
|
801
857
|
|
|
802
|
-
function
|
|
803
|
-
return
|
|
858
|
+
function get(n) {
|
|
859
|
+
return as => {
|
|
860
|
+
return tsplus_module_6.tryCatch(() => unsafeGet_1(n)(as));
|
|
861
|
+
};
|
|
804
862
|
}
|
|
805
863
|
/**
|
|
806
864
|
* @tsplus getter fncts.Conc head
|
|
@@ -826,19 +884,21 @@ function init(self) {
|
|
|
826
884
|
return tsplus_module_6.nothing();
|
|
827
885
|
}
|
|
828
886
|
|
|
829
|
-
return tsplus_module_6.just(take_1(self
|
|
887
|
+
return tsplus_module_6.just(take_1(self.length - 1)(self));
|
|
830
888
|
}
|
|
831
889
|
/**
|
|
832
|
-
* @tsplus
|
|
890
|
+
* @tsplus pipeable fncts.Conc join
|
|
833
891
|
*/
|
|
834
892
|
|
|
835
893
|
|
|
836
|
-
function
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
894
|
+
function join(separator) {
|
|
895
|
+
return self => {
|
|
896
|
+
if (self.length === 0) {
|
|
897
|
+
return "";
|
|
898
|
+
}
|
|
840
899
|
|
|
841
|
-
|
|
900
|
+
return foldLeft_1(unsafeGet_1(0)(self), (b, s) => b + separator + s)(unsafeTail_1(self));
|
|
901
|
+
};
|
|
842
902
|
}
|
|
843
903
|
/**
|
|
844
904
|
* @tsplus getter fncts.Conc last
|
|
@@ -855,47 +915,51 @@ function last(self) {
|
|
|
855
915
|
return tsplus_module_6.just(self.get(self.length - 1));
|
|
856
916
|
}
|
|
857
917
|
/**
|
|
858
|
-
* @tsplus
|
|
918
|
+
* @tsplus pipeable fncts.Conc map
|
|
859
919
|
*/
|
|
860
920
|
|
|
861
921
|
|
|
862
|
-
function
|
|
863
|
-
return
|
|
922
|
+
function map(f) {
|
|
923
|
+
return self => {
|
|
924
|
+
return mapWithIndex_1((_, a) => f(a))(self);
|
|
925
|
+
};
|
|
864
926
|
}
|
|
865
927
|
/**
|
|
866
928
|
* Statefully maps over the Conc, producing new elements of type `B`.
|
|
867
929
|
*
|
|
868
|
-
* @tsplus
|
|
930
|
+
* @tsplus pipeable fncts.Conc mapAccum
|
|
869
931
|
*/
|
|
870
932
|
|
|
871
933
|
|
|
872
|
-
function
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
934
|
+
function mapAccum(s, f) {
|
|
935
|
+
return self => {
|
|
936
|
+
void 0;
|
|
937
|
+
const iterator = self.arrayIterator();
|
|
938
|
+
const out = builder_1();
|
|
939
|
+
let state = s;
|
|
940
|
+
let result;
|
|
941
|
+
|
|
942
|
+
while (!(result = iterator.next()).done) {
|
|
943
|
+
const array = result.value;
|
|
944
|
+
const length = array.length;
|
|
945
|
+
|
|
946
|
+
for (let i = 0; i < length; i++) {
|
|
947
|
+
const a = array[i];
|
|
948
|
+
const tup = f(state, a);
|
|
949
|
+
out.append(tup[1]);
|
|
950
|
+
state = tup[0];
|
|
951
|
+
}
|
|
888
952
|
}
|
|
889
|
-
}
|
|
890
953
|
|
|
891
|
-
|
|
954
|
+
return (0, _function.tuple)(s, out.result());
|
|
955
|
+
};
|
|
892
956
|
}
|
|
893
957
|
|
|
894
958
|
function mapArrayLike(as, len, startIndex, f) {
|
|
895
959
|
let bs = tsplus_module_2.empty();
|
|
896
960
|
|
|
897
961
|
for (let i = 0; i < len; i++) {
|
|
898
|
-
bs = append_1(
|
|
962
|
+
bs = append_1(f(i + startIndex, as[i]))(bs);
|
|
899
963
|
}
|
|
900
964
|
|
|
901
965
|
return bs;
|
|
@@ -905,7 +969,7 @@ function mapArrayLikeReverse(as, len, endIndex, f) {
|
|
|
905
969
|
let bs = tsplus_module_2.empty();
|
|
906
970
|
|
|
907
971
|
for (let i = _definition2.BUFFER_SIZE - len, j = len - 1; i < _definition2.BUFFER_SIZE; i++, j--) {
|
|
908
|
-
bs = append_1(
|
|
972
|
+
bs = append_1(f(endIndex - j, as[i]))(bs);
|
|
909
973
|
}
|
|
910
974
|
|
|
911
975
|
return bs;
|
|
@@ -954,132 +1018,134 @@ class PrependFrame {
|
|
|
954
1018
|
|
|
955
1019
|
}
|
|
956
1020
|
/**
|
|
957
|
-
* @tsplus
|
|
1021
|
+
* @tsplus pipeable fncts.Conc mapWithIndex
|
|
958
1022
|
*/
|
|
959
1023
|
|
|
960
1024
|
|
|
961
|
-
function mapWithIndex_1(
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1025
|
+
function mapWithIndex_1(f) {
|
|
1026
|
+
return self => {
|
|
1027
|
+
let current = self;
|
|
1028
|
+
let index = 0;
|
|
1029
|
+
const stack = tsplus_module_7.makeStack();
|
|
1030
|
+
stack.push(new DoneFrame());
|
|
1031
|
+
let result = tsplus_module_2.empty();
|
|
1032
|
+
|
|
1033
|
+
recursion: while (stack.hasNext) {
|
|
1034
|
+
// eslint-disable-next-line no-constant-condition
|
|
1035
|
+
pushing: while (true) {
|
|
1036
|
+
void 0;
|
|
1037
|
+
|
|
1038
|
+
switch (current._tag) {
|
|
1039
|
+
case "Singleton"
|
|
1040
|
+
/* ConcTag.Singleton */
|
|
1041
|
+
:
|
|
1042
|
+
{
|
|
1043
|
+
result = new _definition2.Singleton(f(index++, current.value));
|
|
1044
|
+
break pushing;
|
|
1045
|
+
}
|
|
967
1046
|
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1047
|
+
case "Empty"
|
|
1048
|
+
/* ConcTag.Empty */
|
|
1049
|
+
:
|
|
1050
|
+
{
|
|
1051
|
+
result = _definition2._Empty;
|
|
1052
|
+
break pushing;
|
|
1053
|
+
}
|
|
972
1054
|
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1055
|
+
case "Chunk"
|
|
1056
|
+
/* ConcTag.Chunk */
|
|
1057
|
+
:
|
|
1058
|
+
{
|
|
1059
|
+
result = new _definition2.Chunk(current._array.map((a, i) => f(i + index, a)));
|
|
1060
|
+
index += current.length;
|
|
1061
|
+
break pushing;
|
|
1062
|
+
}
|
|
981
1063
|
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
1064
|
+
case "Concat"
|
|
1065
|
+
/* ConcTag.Concat */
|
|
1066
|
+
:
|
|
1067
|
+
{
|
|
1068
|
+
stack.push(new ConcatLeftFrame(current, index));
|
|
1069
|
+
current = current.left;
|
|
1070
|
+
continue pushing;
|
|
1071
|
+
}
|
|
989
1072
|
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1073
|
+
case "AppendN"
|
|
1074
|
+
/* ConcTag.AppendN */
|
|
1075
|
+
:
|
|
1076
|
+
{
|
|
1077
|
+
stack.push(new AppendFrame(current.buffer, current.bufferUsed, index));
|
|
1078
|
+
current = current.start;
|
|
1079
|
+
continue pushing;
|
|
1080
|
+
}
|
|
998
1081
|
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1082
|
+
case "PrependN"
|
|
1083
|
+
/* ConcTag.PrependN */
|
|
1084
|
+
:
|
|
1085
|
+
{
|
|
1086
|
+
stack.push(new PrependFrame(mapArrayLikeReverse(current.buffer, current.bufferUsed, index + current.bufferUsed - 1, f), current.end));
|
|
1087
|
+
index += current.bufferUsed;
|
|
1088
|
+
break pushing;
|
|
1089
|
+
}
|
|
1007
1090
|
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
current = current.start;
|
|
1014
|
-
continue pushing;
|
|
1015
|
-
}
|
|
1091
|
+
case "Slice"
|
|
1092
|
+
/* ConcTag.Slice */
|
|
1093
|
+
:
|
|
1094
|
+
{
|
|
1095
|
+
let r = tsplus_module_2.empty();
|
|
1016
1096
|
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
{
|
|
1021
|
-
stack.push(new PrependFrame(mapArrayLikeReverse(current.buffer, current.bufferUsed, index + current.bufferUsed - 1, f), current.end));
|
|
1022
|
-
index += current.bufferUsed;
|
|
1023
|
-
break pushing;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
case "Slice"
|
|
1027
|
-
/* ConcTag.Slice */
|
|
1028
|
-
:
|
|
1029
|
-
{
|
|
1030
|
-
let r = tsplus_module_2.empty();
|
|
1097
|
+
for (let i = 0; i < current.length; i++) {
|
|
1098
|
+
r = append_1(f(i + index, current[i]))(r);
|
|
1099
|
+
}
|
|
1031
1100
|
|
|
1032
|
-
|
|
1033
|
-
|
|
1101
|
+
result = r;
|
|
1102
|
+
index += current.length;
|
|
1103
|
+
break pushing;
|
|
1034
1104
|
}
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
index += current.length;
|
|
1038
|
-
break pushing;
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
} // eslint-disable-next-line no-constant-condition
|
|
1105
|
+
}
|
|
1106
|
+
} // eslint-disable-next-line no-constant-condition
|
|
1042
1107
|
|
|
1043
1108
|
|
|
1044
|
-
|
|
1045
|
-
|
|
1109
|
+
popping: while (true) {
|
|
1110
|
+
const top = stack.pop();
|
|
1046
1111
|
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1112
|
+
switch (top._tag) {
|
|
1113
|
+
case "Done":
|
|
1114
|
+
{
|
|
1115
|
+
return result;
|
|
1116
|
+
}
|
|
1052
1117
|
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1118
|
+
case "ConcatLeft":
|
|
1119
|
+
{
|
|
1120
|
+
current = top.conc.right;
|
|
1121
|
+
stack.push(new ConcatRightFrame(result));
|
|
1122
|
+
continue recursion;
|
|
1123
|
+
}
|
|
1059
1124
|
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1125
|
+
case "ConcatRight":
|
|
1126
|
+
{
|
|
1127
|
+
result = concat_1(result)(top.leftResult);
|
|
1128
|
+
continue popping;
|
|
1129
|
+
}
|
|
1065
1130
|
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1131
|
+
case "Append":
|
|
1132
|
+
{
|
|
1133
|
+
result = concat_1(mapArrayLike(top.buffer, top.bufferUsed, index, f))(result);
|
|
1134
|
+
continue popping;
|
|
1135
|
+
}
|
|
1071
1136
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1137
|
+
case "Prepend":
|
|
1138
|
+
{
|
|
1139
|
+
current = top.end;
|
|
1140
|
+
stack.push(new ConcatRightFrame(top.pre));
|
|
1141
|
+
continue recursion;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1078
1144
|
}
|
|
1079
1145
|
}
|
|
1080
|
-
}
|
|
1081
1146
|
|
|
1082
|
-
|
|
1147
|
+
throw new Error("bug");
|
|
1148
|
+
};
|
|
1083
1149
|
}
|
|
1084
1150
|
/**
|
|
1085
1151
|
* @tsplus getter fncts.Conc isEmpty
|
|
@@ -1099,77 +1165,87 @@ function isNonEmpty_1(conc) {
|
|
|
1099
1165
|
return !isEmpty_1(conc);
|
|
1100
1166
|
}
|
|
1101
1167
|
|
|
1102
|
-
function
|
|
1103
|
-
return
|
|
1168
|
+
function partition(p) {
|
|
1169
|
+
return self => {
|
|
1170
|
+
return partitionWithIndex_1((_, a) => p(a))(self);
|
|
1171
|
+
};
|
|
1104
1172
|
}
|
|
1105
1173
|
/**
|
|
1106
|
-
* @tsplus
|
|
1174
|
+
* @tsplus pipeable fncts.Conc partitionMap
|
|
1107
1175
|
*/
|
|
1108
1176
|
|
|
1109
1177
|
|
|
1110
|
-
function partitionMap_1(
|
|
1111
|
-
return
|
|
1178
|
+
function partitionMap_1(f) {
|
|
1179
|
+
return self => {
|
|
1180
|
+
return partitionMapWithIndex_1((_, a) => f(a))(self);
|
|
1181
|
+
};
|
|
1112
1182
|
}
|
|
1113
1183
|
/**
|
|
1114
|
-
* @tsplus
|
|
1184
|
+
* @tsplus pipeable fncts.Conc partitionMapWithIndex
|
|
1115
1185
|
*/
|
|
1116
1186
|
|
|
1117
1187
|
|
|
1118
|
-
function partitionMapWithIndex_1(
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1188
|
+
function partitionMapWithIndex_1(f) {
|
|
1189
|
+
return fa => {
|
|
1190
|
+
void 0;
|
|
1191
|
+
const iterator = fa.arrayIterator();
|
|
1192
|
+
const left = builder_1();
|
|
1193
|
+
const right = builder_1();
|
|
1194
|
+
let result;
|
|
1195
|
+
let i = 0;
|
|
1196
|
+
|
|
1197
|
+
while (!(result = iterator.next()).done) {
|
|
1198
|
+
const array = result.value;
|
|
1199
|
+
|
|
1200
|
+
for (let j = 0; j < array.length; j++) {
|
|
1201
|
+
const eab = f(i, array[j]);
|
|
1202
|
+
tsplus_module_8.match(b => left.append(b), c => right.append(c))(eab);
|
|
1203
|
+
i++;
|
|
1204
|
+
}
|
|
1133
1205
|
}
|
|
1134
|
-
}
|
|
1135
1206
|
|
|
1136
|
-
|
|
1207
|
+
return [left.result(), right.result()];
|
|
1208
|
+
};
|
|
1137
1209
|
}
|
|
1138
1210
|
|
|
1139
|
-
function partitionWithIndex_1(
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
while (!(result = iterator.next()).done) {
|
|
1148
|
-
const array = result.value;
|
|
1149
|
-
|
|
1150
|
-
for (let j = 0; j < array.length; j++) {
|
|
1151
|
-
const a = array[j];
|
|
1152
|
-
|
|
1153
|
-
if (p(i, a)) {
|
|
1154
|
-
right.append(a);
|
|
1155
|
-
} else {
|
|
1156
|
-
left.append(a);
|
|
1157
|
-
}
|
|
1211
|
+
function partitionWithIndex_1(p) {
|
|
1212
|
+
return self => {
|
|
1213
|
+
void 0;
|
|
1214
|
+
const iterator = self.arrayIterator();
|
|
1215
|
+
const left = builder_1();
|
|
1216
|
+
const right = builder_1();
|
|
1217
|
+
let result;
|
|
1218
|
+
let i = 0;
|
|
1158
1219
|
|
|
1159
|
-
|
|
1220
|
+
while (!(result = iterator.next()).done) {
|
|
1221
|
+
const array = result.value;
|
|
1222
|
+
|
|
1223
|
+
for (let j = 0; j < array.length; j++) {
|
|
1224
|
+
const a = array[j];
|
|
1225
|
+
|
|
1226
|
+
if (p(i, a)) {
|
|
1227
|
+
right.append(a);
|
|
1228
|
+
} else {
|
|
1229
|
+
left.append(a);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
i++;
|
|
1233
|
+
}
|
|
1160
1234
|
}
|
|
1161
|
-
}
|
|
1162
1235
|
|
|
1163
|
-
|
|
1236
|
+
return [left.result(), right.result()];
|
|
1237
|
+
};
|
|
1164
1238
|
}
|
|
1165
1239
|
/**
|
|
1166
|
-
* @tsplus
|
|
1240
|
+
* @tsplus pipeable fncts.Conc prepend
|
|
1167
1241
|
*/
|
|
1168
1242
|
|
|
1169
1243
|
|
|
1170
|
-
function
|
|
1171
|
-
|
|
1172
|
-
|
|
1244
|
+
function prepend(a) {
|
|
1245
|
+
return self => {
|
|
1246
|
+
void 0;
|
|
1247
|
+
return self.prepend(a);
|
|
1248
|
+
};
|
|
1173
1249
|
}
|
|
1174
1250
|
/**
|
|
1175
1251
|
* @tsplus getter fncts.Conc reverse
|
|
@@ -1179,7 +1255,7 @@ function prepend_(self, a) {
|
|
|
1179
1255
|
function reverse(self) {
|
|
1180
1256
|
void 0;
|
|
1181
1257
|
const arr = self.arrayLike();
|
|
1182
|
-
return tsplus_module_9.
|
|
1258
|
+
return tsplus_module_9.makeIterable(() => {
|
|
1183
1259
|
let i = arr.length - 1;
|
|
1184
1260
|
return {
|
|
1185
1261
|
next: () => {
|
|
@@ -1206,48 +1282,52 @@ function reverse(self) {
|
|
|
1206
1282
|
|
|
1207
1283
|
|
|
1208
1284
|
function separate(self) {
|
|
1209
|
-
return partitionMap_1(
|
|
1285
|
+
return partitionMap_1(_function.identity)(self);
|
|
1210
1286
|
}
|
|
1211
1287
|
/**
|
|
1212
|
-
* @tsplus
|
|
1288
|
+
* @tsplus pipeable fncts.Conc splitAt
|
|
1213
1289
|
*/
|
|
1214
1290
|
|
|
1215
1291
|
|
|
1216
|
-
function splitAt_1(
|
|
1217
|
-
return
|
|
1292
|
+
function splitAt_1(n) {
|
|
1293
|
+
return self => {
|
|
1294
|
+
return [take_1(n)(self), drop_1(n)(self)];
|
|
1295
|
+
};
|
|
1218
1296
|
}
|
|
1219
1297
|
/**
|
|
1220
1298
|
* Splits this Conc on the first element that matches this predicate.
|
|
1221
1299
|
*
|
|
1222
|
-
* @tsplus
|
|
1300
|
+
* @tsplus pipeable fncts.Conc splitWhere
|
|
1223
1301
|
*/
|
|
1224
1302
|
|
|
1225
1303
|
|
|
1226
|
-
function
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1304
|
+
function splitWhere(f) {
|
|
1305
|
+
return self => {
|
|
1306
|
+
void 0;
|
|
1307
|
+
const iterator = self.arrayIterator();
|
|
1308
|
+
let next;
|
|
1309
|
+
let cont = true;
|
|
1310
|
+
let i = 0;
|
|
1311
|
+
|
|
1312
|
+
while (cont && (next = iterator.next()) && !next.done) {
|
|
1313
|
+
const array = next.value;
|
|
1314
|
+
const len = array.length;
|
|
1315
|
+
let j = 0;
|
|
1316
|
+
|
|
1317
|
+
while (cont && j < len) {
|
|
1318
|
+
const a = array[j];
|
|
1319
|
+
|
|
1320
|
+
if (f(a)) {
|
|
1321
|
+
cont = false;
|
|
1322
|
+
} else {
|
|
1323
|
+
i++;
|
|
1324
|
+
j++;
|
|
1325
|
+
}
|
|
1246
1326
|
}
|
|
1247
1327
|
}
|
|
1248
|
-
}
|
|
1249
1328
|
|
|
1250
|
-
|
|
1329
|
+
return splitAt_1(i)(self);
|
|
1330
|
+
};
|
|
1251
1331
|
}
|
|
1252
1332
|
/**
|
|
1253
1333
|
* @tsplus getter fncts.Conc tail
|
|
@@ -1259,91 +1339,100 @@ function tail(conc) {
|
|
|
1259
1339
|
return tsplus_module_6.nothing();
|
|
1260
1340
|
}
|
|
1261
1341
|
|
|
1262
|
-
return tsplus_module_6.just(drop_1(
|
|
1342
|
+
return tsplus_module_6.just(drop_1(1)(conc));
|
|
1263
1343
|
}
|
|
1264
1344
|
/**
|
|
1265
|
-
* @tsplus
|
|
1345
|
+
* @tsplus pipeable fncts.Conc take
|
|
1266
1346
|
*/
|
|
1267
1347
|
|
|
1268
1348
|
|
|
1269
|
-
function take_1(
|
|
1270
|
-
|
|
1271
|
-
|
|
1349
|
+
function take_1(n) {
|
|
1350
|
+
return self => {
|
|
1351
|
+
void 0;
|
|
1352
|
+
return self.take(n);
|
|
1353
|
+
};
|
|
1272
1354
|
}
|
|
1273
1355
|
/**
|
|
1274
|
-
* @tsplus
|
|
1356
|
+
* @tsplus pipeable fncts.Conc takeWhile
|
|
1275
1357
|
*/
|
|
1276
1358
|
|
|
1277
1359
|
|
|
1278
|
-
function
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
switch (self._tag) {
|
|
1282
|
-
case "Chunk"
|
|
1283
|
-
/* ConcTag.Chunk */
|
|
1284
|
-
:
|
|
1285
|
-
{
|
|
1286
|
-
const arr = self.arrayLike();
|
|
1287
|
-
let i = 0;
|
|
1288
|
-
|
|
1289
|
-
while (i < arr.length && p(arr[i])) {
|
|
1290
|
-
i++;
|
|
1291
|
-
}
|
|
1360
|
+
function takeWhile(p) {
|
|
1361
|
+
return self => {
|
|
1362
|
+
void 0;
|
|
1292
1363
|
|
|
1293
|
-
|
|
1294
|
-
|
|
1364
|
+
switch (self._tag) {
|
|
1365
|
+
case "Chunk"
|
|
1366
|
+
/* ConcTag.Chunk */
|
|
1367
|
+
:
|
|
1368
|
+
{
|
|
1369
|
+
const arr = self.arrayLike();
|
|
1370
|
+
let i = 0;
|
|
1295
1371
|
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
let result;
|
|
1300
|
-
let cont = true;
|
|
1301
|
-
let i = 0;
|
|
1372
|
+
while (i < arr.length && p(arr[i])) {
|
|
1373
|
+
i++;
|
|
1374
|
+
}
|
|
1302
1375
|
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
let j = 0;
|
|
1376
|
+
return self.take(i);
|
|
1377
|
+
}
|
|
1306
1378
|
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1379
|
+
default:
|
|
1380
|
+
{
|
|
1381
|
+
const iterator = self.arrayIterator();
|
|
1382
|
+
let result;
|
|
1383
|
+
let cont = true;
|
|
1384
|
+
let i = 0;
|
|
1385
|
+
|
|
1386
|
+
while (cont && !(result = iterator.next()).done) {
|
|
1387
|
+
const array = result.value;
|
|
1388
|
+
let j = 0;
|
|
1389
|
+
|
|
1390
|
+
while (cont && j < array.length) {
|
|
1391
|
+
if (!p(array[j])) {
|
|
1392
|
+
cont = false;
|
|
1393
|
+
} else {
|
|
1394
|
+
i++;
|
|
1395
|
+
j++;
|
|
1396
|
+
}
|
|
1313
1397
|
}
|
|
1314
1398
|
}
|
|
1315
|
-
}
|
|
1316
1399
|
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1400
|
+
return self.take(i);
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
};
|
|
1320
1404
|
}
|
|
1321
|
-
/**
|
|
1322
|
-
* @tsplus getter fncts.Conc traverse
|
|
1323
|
-
*/
|
|
1324
1405
|
|
|
1406
|
+
const traverse = G => f => self => _traverse_1(self)(G)(f);
|
|
1407
|
+
|
|
1408
|
+
exports.traverse = traverse;
|
|
1409
|
+
|
|
1410
|
+
const traverseWithIndex = G => f => self => _traverseWithIndex_1(self)(G)(f);
|
|
1411
|
+
|
|
1412
|
+
exports.traverseWithIndex = traverseWithIndex;
|
|
1325
1413
|
|
|
1326
|
-
|
|
1414
|
+
function _traverseWithIndex_1(self) {
|
|
1415
|
+
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);
|
|
1416
|
+
}
|
|
1327
1417
|
/**
|
|
1328
|
-
* @tsplus getter fncts.Conc
|
|
1418
|
+
* @tsplus getter fncts.Conc traverse
|
|
1329
1419
|
*/
|
|
1330
1420
|
|
|
1331
1421
|
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1422
|
+
function _traverse_1(self) {
|
|
1423
|
+
return G => f => _traverseWithIndex_1(self)(G)((_, a) => f(a));
|
|
1424
|
+
}
|
|
1335
1425
|
/**
|
|
1336
1426
|
* @tsplus getter fncts.Conc toBuffer
|
|
1337
1427
|
*/
|
|
1338
1428
|
|
|
1339
|
-
exports.traverseWithIndex = traverseWithIndex;
|
|
1340
1429
|
|
|
1341
1430
|
function toBuffer(self) {
|
|
1342
1431
|
void 0;
|
|
1343
1432
|
return self.arrayLike();
|
|
1344
1433
|
}
|
|
1345
1434
|
/**
|
|
1346
|
-
* @tsplus
|
|
1435
|
+
* @tsplus static fncts.ConcOps unfold
|
|
1347
1436
|
*/
|
|
1348
1437
|
|
|
1349
1438
|
|
|
@@ -1364,14 +1453,16 @@ function unfold(b, f) {
|
|
|
1364
1453
|
}
|
|
1365
1454
|
}
|
|
1366
1455
|
/**
|
|
1367
|
-
* @tsplus
|
|
1368
|
-
* @tsplus index fncts.Conc
|
|
1456
|
+
* @tsplus pipeable fncts.Conc unsafeGet
|
|
1457
|
+
* @tsplus pipeable-index fncts.Conc
|
|
1369
1458
|
*/
|
|
1370
1459
|
|
|
1371
1460
|
|
|
1372
|
-
function unsafeGet_1(
|
|
1373
|
-
|
|
1374
|
-
|
|
1461
|
+
function unsafeGet_1(n) {
|
|
1462
|
+
return self => {
|
|
1463
|
+
void 0;
|
|
1464
|
+
return self.get(n);
|
|
1465
|
+
};
|
|
1375
1466
|
}
|
|
1376
1467
|
/**
|
|
1377
1468
|
* Returns the first element of this Conc. Note that this method is partial
|
|
@@ -1399,84 +1490,92 @@ function unsafeHead_1(as) {
|
|
|
1399
1490
|
|
|
1400
1491
|
function unsafeTail_1(self) {
|
|
1401
1492
|
if (self.length === 0) {
|
|
1402
|
-
throw new
|
|
1493
|
+
throw new tsplus_module_11.ArrayIndexOutOfBoundsError("Chunk.unsafeTail access to 1");
|
|
1403
1494
|
}
|
|
1404
1495
|
|
|
1405
|
-
return drop_1(
|
|
1496
|
+
return drop_1(1)(self);
|
|
1406
1497
|
}
|
|
1407
1498
|
/**
|
|
1408
|
-
* @tsplus
|
|
1499
|
+
* @tsplus pipeable fncts.Conc unsafeUpdateAt
|
|
1409
1500
|
*/
|
|
1410
1501
|
|
|
1411
1502
|
|
|
1412
|
-
function unsafeUpdateAt_1(
|
|
1413
|
-
|
|
1414
|
-
|
|
1503
|
+
function unsafeUpdateAt_1(i, a) {
|
|
1504
|
+
return self => {
|
|
1505
|
+
void 0;
|
|
1506
|
+
return self.update(i, a);
|
|
1507
|
+
};
|
|
1415
1508
|
}
|
|
1416
1509
|
/**
|
|
1417
|
-
* @tsplus
|
|
1510
|
+
* @tsplus pipeable fncts.Conc updateAt
|
|
1418
1511
|
*/
|
|
1419
1512
|
|
|
1420
1513
|
|
|
1421
|
-
function
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1514
|
+
function updateAt(i, a) {
|
|
1515
|
+
return self => {
|
|
1516
|
+
try {
|
|
1517
|
+
return tsplus_module_6.just(unsafeUpdateAt_1(i, a)(self));
|
|
1518
|
+
} catch {
|
|
1519
|
+
return tsplus_module_6.nothing();
|
|
1520
|
+
}
|
|
1521
|
+
};
|
|
1427
1522
|
}
|
|
1428
1523
|
/**
|
|
1429
|
-
* @tsplus
|
|
1524
|
+
* @tsplus pipeable fncts.Conc zip
|
|
1430
1525
|
*/
|
|
1431
1526
|
|
|
1432
1527
|
|
|
1433
|
-
function
|
|
1434
|
-
return
|
|
1528
|
+
function zip(fb) {
|
|
1529
|
+
return self => {
|
|
1530
|
+
return zipWith_1(fb, _function.tuple)(self);
|
|
1531
|
+
};
|
|
1435
1532
|
}
|
|
1436
1533
|
/**
|
|
1437
|
-
* @tsplus
|
|
1534
|
+
* @tsplus pipeable fncts.Conc zipWith
|
|
1438
1535
|
*/
|
|
1439
1536
|
|
|
1440
1537
|
|
|
1441
|
-
function zipWith_1(
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1538
|
+
function zipWith_1(fb, f) {
|
|
1539
|
+
return self => {
|
|
1540
|
+
void 0;
|
|
1541
|
+
void 0;
|
|
1542
|
+
const length = Math.min(self.length, fb.length);
|
|
1445
1543
|
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1544
|
+
if (length === 0) {
|
|
1545
|
+
return tsplus_module_2.empty();
|
|
1546
|
+
} else {
|
|
1547
|
+
const leftIterator = self.arrayIterator();
|
|
1548
|
+
const rightIterator = fb.arrayIterator();
|
|
1549
|
+
const out = builder_1();
|
|
1550
|
+
let left = null;
|
|
1551
|
+
let right = null;
|
|
1552
|
+
let leftLength = 0;
|
|
1553
|
+
let rightLength = 0;
|
|
1554
|
+
let i = 0;
|
|
1555
|
+
let j = 0;
|
|
1556
|
+
let k = 0;
|
|
1557
|
+
|
|
1558
|
+
while (i < length) {
|
|
1559
|
+
if (j < leftLength && k < rightLength) {
|
|
1560
|
+
const a = left.value[j];
|
|
1561
|
+
const b = right.value[k];
|
|
1562
|
+
const c = f(a, b);
|
|
1563
|
+
out.append(c);
|
|
1564
|
+
i++;
|
|
1565
|
+
j++;
|
|
1566
|
+
k++;
|
|
1567
|
+
} else if (j === leftLength && !(left = leftIterator.next()).done) {
|
|
1568
|
+
leftLength = left.value.length;
|
|
1569
|
+
j = 0;
|
|
1570
|
+
} else if (k === rightLength && !(right = rightIterator.next()).done) {
|
|
1571
|
+
rightLength = right.value.length;
|
|
1572
|
+
k = 0;
|
|
1573
|
+
}
|
|
1475
1574
|
}
|
|
1476
|
-
}
|
|
1477
1575
|
|
|
1478
|
-
|
|
1479
|
-
|
|
1576
|
+
return out.result();
|
|
1577
|
+
}
|
|
1578
|
+
};
|
|
1480
1579
|
}
|
|
1481
1580
|
/**
|
|
1482
1581
|
* @tsplus getter fncts.Conc zipWithIndex
|
|
@@ -1484,29 +1583,31 @@ function zipWith_1(self, fb, f) {
|
|
|
1484
1583
|
|
|
1485
1584
|
|
|
1486
1585
|
function zipWithIndex(self) {
|
|
1487
|
-
return zipWithIndexOffset_1(
|
|
1586
|
+
return zipWithIndexOffset_1(0)(self);
|
|
1488
1587
|
}
|
|
1489
1588
|
/**
|
|
1490
|
-
* @tsplus
|
|
1589
|
+
* @tsplus pipeable fncts.Conc zipWithIndexOffset
|
|
1491
1590
|
*/
|
|
1492
1591
|
|
|
1493
1592
|
|
|
1494
|
-
function zipWithIndexOffset_1(
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1593
|
+
function zipWithIndexOffset_1(offset) {
|
|
1594
|
+
return as => {
|
|
1595
|
+
void 0;
|
|
1596
|
+
const iterator = as.arrayIterator();
|
|
1597
|
+
let next;
|
|
1598
|
+
let i = offset;
|
|
1599
|
+
const out = builder_1();
|
|
1500
1600
|
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1601
|
+
while (!(next = iterator.next()).done) {
|
|
1602
|
+
const array = next.value;
|
|
1603
|
+
const len = array.length;
|
|
1504
1604
|
|
|
1505
|
-
|
|
1506
|
-
|
|
1605
|
+
for (let j = 0; i < len; j++, i++) {
|
|
1606
|
+
out.append([array[j], i]);
|
|
1607
|
+
}
|
|
1507
1608
|
}
|
|
1508
|
-
}
|
|
1509
1609
|
|
|
1510
|
-
|
|
1610
|
+
return out.result();
|
|
1611
|
+
};
|
|
1511
1612
|
}
|
|
1512
1613
|
//# sourceMappingURL=api.cjs.map
|