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