@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
|
@@ -2,76 +2,80 @@ import * as tsplus_module_1 from "@fncts/base/collection/Iterable/constructors";
|
|
|
2
2
|
import * as tsplus_module_2 from "@fncts/base/data/Maybe/definition";
|
|
3
3
|
import * as tsplus_module_3 from "@fncts/base/data/Maybe/constructors";
|
|
4
4
|
import * as tsplus_module_4 from "@fncts/base/control/Eval/constructors";
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
5
|
+
export const flatMap = flatMap_1;
|
|
6
|
+
export const everyWithIndex = everyWithIndex_1;
|
|
7
|
+
export const filterMapWithIndex = filterMapWithIndex_1;
|
|
8
|
+
export const filterWithIndex = filterWithIndex_1;
|
|
9
|
+
export const foldLeftWithIndex = foldLeftWithIndex_1;
|
|
10
|
+
export const foldLeft = foldLeft_1;
|
|
11
|
+
export const foldMapWithIndex = foldMapWithIndex_1;
|
|
12
|
+
export const foldRightWithIndex = foldRightWithIndex_1;
|
|
13
|
+
export const map = map_1;
|
|
14
|
+
export const mapWithIndex = mapWithIndex_1;
|
|
15
|
+
export const partitionMapWithIndex = partitionMapWithIndex_1;
|
|
16
|
+
export const partitionWithIndex = partitionWithIndex_1;
|
|
17
17
|
import { tuple } from "@fncts/base/data/function";
|
|
18
18
|
/**
|
|
19
|
-
* @tsplus
|
|
19
|
+
* @tsplus pipeable fncts.Iterable ap
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
export function
|
|
23
|
-
return
|
|
22
|
+
export function ap(fa) {
|
|
23
|
+
return self => {
|
|
24
|
+
return flatMap_1(f => map_1(f)(fa))(self);
|
|
25
|
+
};
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
|
-
* @tsplus
|
|
28
|
+
* @tsplus pipeable fncts.Iterable append
|
|
27
29
|
*/
|
|
28
30
|
|
|
29
|
-
export function
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
export function append(b) {
|
|
32
|
+
return self => {
|
|
33
|
+
return tsplus_module_1.makeIterable(() => {
|
|
34
|
+
let done = false;
|
|
35
|
+
const ia = self[Symbol.iterator]();
|
|
36
|
+
let va;
|
|
37
|
+
return {
|
|
38
|
+
next() {
|
|
39
|
+
if (done) {
|
|
40
|
+
return this.return();
|
|
41
|
+
}
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
va = ia.next();
|
|
44
|
+
|
|
45
|
+
if (va.done) {
|
|
46
|
+
done = true;
|
|
47
|
+
return {
|
|
48
|
+
done: false,
|
|
49
|
+
value: b
|
|
50
|
+
};
|
|
51
|
+
}
|
|
41
52
|
|
|
42
|
-
if (va.done) {
|
|
43
|
-
done = true;
|
|
44
53
|
return {
|
|
45
|
-
done
|
|
46
|
-
value:
|
|
54
|
+
done,
|
|
55
|
+
value: va.value
|
|
47
56
|
};
|
|
48
|
-
}
|
|
57
|
+
},
|
|
49
58
|
|
|
50
|
-
return {
|
|
51
|
-
done
|
|
52
|
-
value: va.value
|
|
53
|
-
};
|
|
54
|
-
},
|
|
59
|
+
return(value) {
|
|
60
|
+
done = true;
|
|
55
61
|
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
if (!done) {
|
|
63
|
+
done = true;
|
|
64
|
+
}
|
|
58
65
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
if (typeof ia.return === "function") {
|
|
67
|
+
ia.return();
|
|
68
|
+
}
|
|
62
69
|
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
return {
|
|
71
|
+
done,
|
|
72
|
+
value
|
|
73
|
+
};
|
|
65
74
|
}
|
|
66
75
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
};
|
|
74
|
-
});
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
};
|
|
75
79
|
}
|
|
76
80
|
/**
|
|
77
81
|
* @tsplus getter fncts.Iterable asIterable
|
|
@@ -81,427 +85,467 @@ export function asIterable(self) {
|
|
|
81
85
|
return self;
|
|
82
86
|
}
|
|
83
87
|
/**
|
|
84
|
-
* @tsplus
|
|
88
|
+
* @tsplus pipeable fncts.Iterable flatMap
|
|
85
89
|
*/
|
|
86
90
|
|
|
87
|
-
function flatMap_1(
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
function flatMap_1(f) {
|
|
92
|
+
return self => {
|
|
93
|
+
return tsplus_module_1.makeIterable(() => {
|
|
94
|
+
const ia = self[Symbol.iterator]();
|
|
95
|
+
let ib;
|
|
96
|
+
let va;
|
|
97
|
+
let vb;
|
|
98
|
+
let done = false;
|
|
94
99
|
|
|
95
|
-
|
|
96
|
-
|
|
100
|
+
const pullA = onDone => {
|
|
101
|
+
va = ia.next();
|
|
97
102
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
if (va.done) {
|
|
104
|
+
return onDone();
|
|
105
|
+
}
|
|
101
106
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
ib = f(va.value)[Symbol.iterator]();
|
|
108
|
+
return pullB(onDone);
|
|
109
|
+
};
|
|
105
110
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
const pullB = onDone => {
|
|
112
|
+
if (!ib) {
|
|
113
|
+
return pullA(onDone);
|
|
114
|
+
}
|
|
110
115
|
|
|
111
|
-
|
|
116
|
+
vb = ib.next();
|
|
112
117
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
if (!vb.done) {
|
|
119
|
+
return {
|
|
120
|
+
done,
|
|
121
|
+
value: vb.value
|
|
122
|
+
};
|
|
123
|
+
}
|
|
119
124
|
|
|
120
|
-
|
|
121
|
-
|
|
125
|
+
return pullA(onDone);
|
|
126
|
+
};
|
|
122
127
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
return {
|
|
129
|
+
next() {
|
|
130
|
+
if (done) {
|
|
131
|
+
return this.return();
|
|
132
|
+
}
|
|
128
133
|
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
return pullB(() => this.return());
|
|
135
|
+
},
|
|
131
136
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
return(value) {
|
|
138
|
+
if (!done) {
|
|
139
|
+
done = true;
|
|
135
140
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
141
|
+
if (typeof ia.return === "function") {
|
|
142
|
+
ia.return();
|
|
143
|
+
}
|
|
139
144
|
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
if (ib && typeof ib.return === "function") {
|
|
146
|
+
ib.return();
|
|
147
|
+
}
|
|
142
148
|
}
|
|
143
|
-
}
|
|
144
149
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
+
return {
|
|
151
|
+
done,
|
|
152
|
+
value
|
|
153
|
+
};
|
|
154
|
+
}
|
|
150
155
|
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
};
|
|
153
159
|
}
|
|
154
160
|
/**
|
|
155
|
-
* @tsplus
|
|
161
|
+
* @tsplus pipeable fncts.Iterable concat
|
|
156
162
|
*/
|
|
157
163
|
|
|
158
164
|
|
|
159
|
-
export function
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
export function concat(ib) {
|
|
166
|
+
return self => {
|
|
167
|
+
return tsplus_module_1.makeIterable(() => {
|
|
168
|
+
const iterA = self[Symbol.iterator]();
|
|
169
|
+
let doneA = false;
|
|
170
|
+
let iterB;
|
|
171
|
+
return {
|
|
172
|
+
next() {
|
|
173
|
+
if (!doneA) {
|
|
174
|
+
const r = iterA.next();
|
|
175
|
+
|
|
176
|
+
if (r.done) {
|
|
177
|
+
doneA = true;
|
|
178
|
+
iterB = ib[Symbol.iterator]();
|
|
179
|
+
return iterB.next();
|
|
180
|
+
}
|
|
168
181
|
|
|
169
|
-
|
|
170
|
-
doneA = true;
|
|
171
|
-
iterB = ib[Symbol.iterator]();
|
|
172
|
-
return iterB.next();
|
|
182
|
+
return r;
|
|
173
183
|
}
|
|
174
184
|
|
|
175
|
-
return
|
|
185
|
+
return iterB.next();
|
|
176
186
|
}
|
|
177
187
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
};
|
|
182
|
-
});
|
|
188
|
+
};
|
|
189
|
+
});
|
|
190
|
+
};
|
|
183
191
|
}
|
|
184
192
|
/**
|
|
185
|
-
* @tsplus
|
|
193
|
+
* @tsplus pipeable fncts.Iterable corresponds
|
|
186
194
|
*/
|
|
187
195
|
|
|
188
|
-
export function
|
|
189
|
-
|
|
190
|
-
|
|
196
|
+
export function corresponds(right, f) {
|
|
197
|
+
return left => {
|
|
198
|
+
const leftIterator = left[Symbol.iterator]();
|
|
199
|
+
const rightIterator = right[Symbol.iterator](); // eslint-disable-next-line no-constant-condition
|
|
191
200
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
201
|
+
while (true) {
|
|
202
|
+
const lnext = leftIterator.next();
|
|
203
|
+
const rnext = rightIterator.next();
|
|
195
204
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
205
|
+
if (lnext.done !== rnext.done) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
199
208
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
209
|
+
if (lnext.done) {
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
203
212
|
|
|
204
|
-
|
|
205
|
-
|
|
213
|
+
if (!f(lnext.value, rnext.value)) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
206
216
|
}
|
|
207
|
-
}
|
|
217
|
+
};
|
|
208
218
|
}
|
|
209
219
|
/**
|
|
210
|
-
* @tsplus
|
|
220
|
+
* @tsplus pipeable fncts.Iterable crossWith
|
|
211
221
|
*/
|
|
212
222
|
|
|
213
|
-
export function
|
|
214
|
-
return
|
|
223
|
+
export function crossWith(fb, f) {
|
|
224
|
+
return self => {
|
|
225
|
+
return flatMap_1(a => map_1(b => f(a, b))(fb))(self);
|
|
226
|
+
};
|
|
215
227
|
}
|
|
216
|
-
export function
|
|
217
|
-
return
|
|
228
|
+
export function every(p) {
|
|
229
|
+
return self => {
|
|
230
|
+
return everyWithIndex_1((_, a) => p(a))(self);
|
|
231
|
+
};
|
|
218
232
|
}
|
|
219
233
|
|
|
220
|
-
function everyWithIndex_1(
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
234
|
+
function everyWithIndex_1(p) {
|
|
235
|
+
return self => {
|
|
236
|
+
const iterator = self[Symbol.iterator]();
|
|
237
|
+
let i = 0;
|
|
238
|
+
let next;
|
|
239
|
+
|
|
240
|
+
while (!(next = iterator.next()).done) {
|
|
241
|
+
if (!p(i, next.value)) {
|
|
242
|
+
if (typeof iterator.return === "function") {
|
|
243
|
+
iterator.return();
|
|
244
|
+
}
|
|
224
245
|
|
|
225
|
-
|
|
226
|
-
if (!p(i, next.value)) {
|
|
227
|
-
if (typeof iterator.return === "function") {
|
|
228
|
-
iterator.return();
|
|
246
|
+
return false;
|
|
229
247
|
}
|
|
230
248
|
|
|
231
|
-
|
|
249
|
+
i++;
|
|
232
250
|
}
|
|
233
251
|
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
return true;
|
|
252
|
+
return true;
|
|
253
|
+
};
|
|
238
254
|
}
|
|
239
255
|
|
|
240
|
-
export function
|
|
241
|
-
return
|
|
256
|
+
export function filter(p) {
|
|
257
|
+
return self => {
|
|
258
|
+
return filterWithIndex_1((_, a) => p(a))(self);
|
|
259
|
+
};
|
|
242
260
|
}
|
|
243
261
|
/**
|
|
244
|
-
* @tsplus
|
|
262
|
+
* @tsplus pipeable fncts.Iterable filterMap
|
|
245
263
|
*/
|
|
246
264
|
|
|
247
|
-
export function
|
|
248
|
-
return
|
|
265
|
+
export function filterMap(f) {
|
|
266
|
+
return self => {
|
|
267
|
+
return filterMapWithIndex_1((_, a) => f(a))(self);
|
|
268
|
+
};
|
|
249
269
|
}
|
|
250
270
|
/**
|
|
251
|
-
* @tsplus
|
|
271
|
+
* @tsplus pipeable fncts.Iterable filterMapWithIndex
|
|
252
272
|
*/
|
|
253
273
|
|
|
254
|
-
function filterMapWithIndex_1(
|
|
255
|
-
return
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
274
|
+
function filterMapWithIndex_1(f) {
|
|
275
|
+
return self => {
|
|
276
|
+
return tsplus_module_1.makeIterable(() => {
|
|
277
|
+
let i = 0;
|
|
278
|
+
const ia = self[Symbol.iterator]();
|
|
279
|
+
let va;
|
|
280
|
+
let done = false;
|
|
281
|
+
return {
|
|
282
|
+
next() {
|
|
283
|
+
if (done) {
|
|
284
|
+
this.return();
|
|
285
|
+
} // eslint-disable-next-line no-constant-condition
|
|
265
286
|
|
|
266
287
|
|
|
267
|
-
|
|
268
|
-
|
|
288
|
+
while (true) {
|
|
289
|
+
va = ia.next();
|
|
269
290
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
291
|
+
if (va.done) {
|
|
292
|
+
return this.return();
|
|
293
|
+
}
|
|
273
294
|
|
|
274
|
-
|
|
295
|
+
const mb = f(i++, va.value);
|
|
275
296
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
297
|
+
if (tsplus_module_2.isJust(mb)) {
|
|
298
|
+
return {
|
|
299
|
+
done,
|
|
300
|
+
value: mb.value
|
|
301
|
+
};
|
|
302
|
+
}
|
|
281
303
|
}
|
|
282
|
-
}
|
|
283
|
-
},
|
|
304
|
+
},
|
|
284
305
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
306
|
+
return(value) {
|
|
307
|
+
if (!done) {
|
|
308
|
+
done = true;
|
|
288
309
|
|
|
289
|
-
|
|
290
|
-
|
|
310
|
+
if (typeof ia.return === "function") {
|
|
311
|
+
ia.return();
|
|
312
|
+
}
|
|
291
313
|
}
|
|
292
|
-
}
|
|
293
314
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
315
|
+
return {
|
|
316
|
+
done,
|
|
317
|
+
value
|
|
318
|
+
};
|
|
319
|
+
}
|
|
299
320
|
|
|
300
|
-
|
|
301
|
-
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
};
|
|
302
324
|
}
|
|
303
325
|
|
|
304
|
-
function filterWithIndex_1(
|
|
305
|
-
return
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
326
|
+
function filterWithIndex_1(p) {
|
|
327
|
+
return self => {
|
|
328
|
+
return tsplus_module_1.makeIterable(() => {
|
|
329
|
+
let done = false;
|
|
330
|
+
let i = 0;
|
|
331
|
+
const ia = self[Symbol.iterator]();
|
|
332
|
+
let va;
|
|
333
|
+
return {
|
|
334
|
+
next() {
|
|
335
|
+
if (done) {
|
|
336
|
+
return this.return();
|
|
337
|
+
} // eslint-disable-next-line no-constant-condition
|
|
315
338
|
|
|
316
339
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
340
|
+
while (true) {
|
|
341
|
+
va = ia.next();
|
|
342
|
+
if (va.done) return this.return();
|
|
343
|
+
if (p(i++, va.value)) return {
|
|
344
|
+
done,
|
|
345
|
+
value: va.value
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
},
|
|
326
349
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
350
|
+
return(value) {
|
|
351
|
+
if (!done) {
|
|
352
|
+
done = true;
|
|
330
353
|
|
|
331
|
-
|
|
332
|
-
|
|
354
|
+
if (typeof ia.return === "function") {
|
|
355
|
+
ia.return();
|
|
356
|
+
}
|
|
333
357
|
}
|
|
334
|
-
}
|
|
335
358
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
359
|
+
return {
|
|
360
|
+
done,
|
|
361
|
+
value
|
|
362
|
+
};
|
|
363
|
+
}
|
|
341
364
|
|
|
342
|
-
|
|
343
|
-
|
|
365
|
+
};
|
|
366
|
+
});
|
|
367
|
+
};
|
|
344
368
|
}
|
|
345
369
|
|
|
346
|
-
export function
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
370
|
+
export function find(predicate) {
|
|
371
|
+
return ia => {
|
|
372
|
+
for (const value of ia) {
|
|
373
|
+
if (predicate(value)) {
|
|
374
|
+
return tsplus_module_3.just(value);
|
|
375
|
+
}
|
|
350
376
|
}
|
|
351
|
-
}
|
|
352
377
|
|
|
353
|
-
|
|
378
|
+
return tsplus_module_3.nothing();
|
|
379
|
+
};
|
|
354
380
|
}
|
|
355
381
|
/**
|
|
356
|
-
* @tsplus
|
|
382
|
+
* @tsplus pipeable fncts.Iterable findIndex
|
|
357
383
|
*/
|
|
358
384
|
|
|
359
|
-
export function findIndex(
|
|
360
|
-
|
|
385
|
+
export function findIndex(p) {
|
|
386
|
+
return self => {
|
|
387
|
+
let i = 0;
|
|
361
388
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
389
|
+
for (const value of self) {
|
|
390
|
+
if (p(value)) {
|
|
391
|
+
return i;
|
|
392
|
+
}
|
|
366
393
|
|
|
367
|
-
|
|
368
|
-
|
|
394
|
+
i++;
|
|
395
|
+
}
|
|
369
396
|
|
|
370
|
-
|
|
397
|
+
return -1;
|
|
398
|
+
};
|
|
371
399
|
}
|
|
372
400
|
/**
|
|
373
|
-
* @tsplus
|
|
401
|
+
* @tsplus pipeable fncts.Iterable foldLeftWithIndex
|
|
374
402
|
*/
|
|
375
403
|
|
|
376
|
-
function foldLeftWithIndex_1(
|
|
377
|
-
|
|
378
|
-
|
|
404
|
+
function foldLeftWithIndex_1(b, f) {
|
|
405
|
+
return fa => {
|
|
406
|
+
let res = b;
|
|
407
|
+
let i = -1;
|
|
379
408
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
409
|
+
for (const value of fa) {
|
|
410
|
+
i += 1;
|
|
411
|
+
res = f(i, res, value);
|
|
412
|
+
}
|
|
384
413
|
|
|
385
|
-
|
|
414
|
+
return res;
|
|
415
|
+
};
|
|
386
416
|
}
|
|
387
417
|
/**
|
|
388
|
-
* @tsplus
|
|
418
|
+
* @tsplus pipeable fncts.Iterable foldLeft
|
|
389
419
|
*/
|
|
390
420
|
|
|
391
421
|
|
|
392
|
-
function foldLeft_1(
|
|
393
|
-
return
|
|
422
|
+
function foldLeft_1(b, f) {
|
|
423
|
+
return self => {
|
|
424
|
+
return foldLeftWithIndex_1(b, (_, b, a) => f(b, a))(self);
|
|
425
|
+
};
|
|
394
426
|
}
|
|
395
427
|
/**
|
|
396
|
-
* @tsplus
|
|
428
|
+
* @tsplus pipeable fncts.Iterable foldMap
|
|
397
429
|
*/
|
|
398
430
|
|
|
399
431
|
|
|
400
|
-
export function
|
|
432
|
+
export function foldMap(f,
|
|
401
433
|
/** @tsplus auto */
|
|
402
434
|
M) {
|
|
403
|
-
return
|
|
435
|
+
return self => {
|
|
436
|
+
return foldMapWithIndex_1((_, a) => f(a), M)(self);
|
|
437
|
+
};
|
|
404
438
|
}
|
|
405
439
|
/**
|
|
406
|
-
* @tsplus
|
|
440
|
+
* @tsplus pipeable fncts.Iterable foldMapWithIndex
|
|
407
441
|
*/
|
|
408
442
|
|
|
409
|
-
function foldMapWithIndex_1(
|
|
443
|
+
function foldMapWithIndex_1(f,
|
|
410
444
|
/** @tsplus auto */
|
|
411
445
|
M) {
|
|
412
|
-
|
|
413
|
-
|
|
446
|
+
return self => {
|
|
447
|
+
let res = M.nat;
|
|
448
|
+
let n = -1;
|
|
414
449
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
450
|
+
for (const value of self) {
|
|
451
|
+
n += 1;
|
|
452
|
+
res = M.combine(res, f(n, value));
|
|
453
|
+
}
|
|
419
454
|
|
|
420
|
-
|
|
455
|
+
return res;
|
|
456
|
+
};
|
|
421
457
|
}
|
|
422
458
|
/**
|
|
423
|
-
* @tsplus
|
|
459
|
+
* @tsplus pipeable fncts.Iterable foldRightWithIndex
|
|
424
460
|
*/
|
|
425
461
|
|
|
426
462
|
|
|
427
|
-
function foldRightWithIndex_1(
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
const {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
463
|
+
function foldRightWithIndex_1(b, f) {
|
|
464
|
+
return self => {
|
|
465
|
+
let i = 0;
|
|
466
|
+
const iterator = self[Symbol.iterator]();
|
|
467
|
+
const go = tsplus_module_4.defer(() => {
|
|
468
|
+
const {
|
|
469
|
+
value: current,
|
|
470
|
+
done
|
|
471
|
+
} = iterator.next();
|
|
472
|
+
|
|
473
|
+
if (done) {
|
|
474
|
+
return b;
|
|
475
|
+
} else {
|
|
476
|
+
return f(i++, current, go);
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
return go;
|
|
480
|
+
};
|
|
443
481
|
}
|
|
444
482
|
/**
|
|
445
|
-
* @tsplus
|
|
483
|
+
* @tsplus pipeable fncts.Iterable foldRight
|
|
446
484
|
*/
|
|
447
485
|
|
|
448
486
|
|
|
449
|
-
export function
|
|
450
|
-
return
|
|
487
|
+
export function foldRight(b, f) {
|
|
488
|
+
return self => {
|
|
489
|
+
return foldRightWithIndex_1(b, (_, a, b) => f(a, b))(self);
|
|
490
|
+
};
|
|
451
491
|
}
|
|
452
492
|
/**
|
|
453
|
-
* @tsplus
|
|
493
|
+
* @tsplus pipeable fncts.Iterable map
|
|
454
494
|
*/
|
|
455
495
|
|
|
456
|
-
function map_1(
|
|
457
|
-
return
|
|
496
|
+
function map_1(f) {
|
|
497
|
+
return self => {
|
|
498
|
+
return mapWithIndex_1((_, a) => f(a))(self);
|
|
499
|
+
};
|
|
458
500
|
}
|
|
459
501
|
/**
|
|
460
|
-
* @tsplus
|
|
502
|
+
* @tsplus pipeable fncts.Iterable mapWithIndex
|
|
461
503
|
*/
|
|
462
504
|
|
|
463
505
|
|
|
464
|
-
function mapWithIndex_1(
|
|
465
|
-
return
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
506
|
+
function mapWithIndex_1(f) {
|
|
507
|
+
return self => {
|
|
508
|
+
return tsplus_module_1.makeIterable(() => {
|
|
509
|
+
const ia = self[Symbol.iterator]();
|
|
510
|
+
let i = 0;
|
|
511
|
+
let done = false;
|
|
512
|
+
let va;
|
|
513
|
+
return {
|
|
514
|
+
next() {
|
|
515
|
+
if (done) {
|
|
516
|
+
return this.return();
|
|
517
|
+
}
|
|
475
518
|
|
|
476
|
-
|
|
519
|
+
va = ia.next();
|
|
477
520
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
521
|
+
if (va.done) {
|
|
522
|
+
return this.return();
|
|
523
|
+
}
|
|
481
524
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
525
|
+
return {
|
|
526
|
+
done,
|
|
527
|
+
value: f(i++, va.value)
|
|
528
|
+
};
|
|
529
|
+
},
|
|
487
530
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
531
|
+
return(value) {
|
|
532
|
+
if (!done) {
|
|
533
|
+
done = true;
|
|
491
534
|
|
|
492
|
-
|
|
493
|
-
|
|
535
|
+
if (typeof ia.return === "function") {
|
|
536
|
+
ia.return();
|
|
537
|
+
}
|
|
494
538
|
}
|
|
495
|
-
}
|
|
496
539
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
540
|
+
return {
|
|
541
|
+
done,
|
|
542
|
+
value
|
|
543
|
+
};
|
|
544
|
+
}
|
|
502
545
|
|
|
503
|
-
|
|
504
|
-
|
|
546
|
+
};
|
|
547
|
+
});
|
|
548
|
+
};
|
|
505
549
|
}
|
|
506
550
|
|
|
507
551
|
function handlePartitionMap(f, i, a, h) {
|
|
@@ -566,19 +610,23 @@ function partitionMapWithIndexIterator(fa, f, h) {
|
|
|
566
610
|
};
|
|
567
611
|
}
|
|
568
612
|
/**
|
|
569
|
-
* @tsplus
|
|
613
|
+
* @tsplus pipeable fncts.Iterable partitionMap
|
|
570
614
|
*/
|
|
571
615
|
|
|
572
616
|
|
|
573
|
-
export function
|
|
574
|
-
return
|
|
617
|
+
export function partitionMap(f) {
|
|
618
|
+
return self => {
|
|
619
|
+
return partitionMapWithIndex_1((_, a) => f(a))(self);
|
|
620
|
+
};
|
|
575
621
|
}
|
|
576
622
|
/**
|
|
577
|
-
* @tsplus
|
|
623
|
+
* @tsplus pipeable fncts.Iterable partitionMapWithIndex
|
|
578
624
|
*/
|
|
579
625
|
|
|
580
|
-
function partitionMapWithIndex_1(
|
|
581
|
-
return
|
|
626
|
+
function partitionMapWithIndex_1(f) {
|
|
627
|
+
return fa => {
|
|
628
|
+
return tuple(tsplus_module_1.makeIterable(() => partitionMapWithIndexIterator(fa, f, "Left")), tsplus_module_1.makeIterable(() => partitionMapWithIndexIterator(fa, f, "Right")));
|
|
629
|
+
};
|
|
582
630
|
}
|
|
583
631
|
|
|
584
632
|
function handlePartition(predicate, i, a, h) {
|
|
@@ -638,12 +686,16 @@ function partitionWithIndexIterator(fa, predicate, h) {
|
|
|
638
686
|
};
|
|
639
687
|
}
|
|
640
688
|
|
|
641
|
-
export function
|
|
642
|
-
return
|
|
689
|
+
export function partition(p) {
|
|
690
|
+
return self => {
|
|
691
|
+
return partitionWithIndex_1((_, a) => p(a))(self);
|
|
692
|
+
};
|
|
643
693
|
}
|
|
644
694
|
|
|
645
|
-
function partitionWithIndex_1(
|
|
646
|
-
return
|
|
695
|
+
function partitionWithIndex_1(p) {
|
|
696
|
+
return self => {
|
|
697
|
+
return tuple(tsplus_module_1.makeIterable(() => partitionWithIndexIterator(self, p, false)), tsplus_module_1.makeIterable(() => partitionWithIndexIterator(self, p, true)));
|
|
698
|
+
};
|
|
647
699
|
}
|
|
648
700
|
/**
|
|
649
701
|
* @tsplus getter fncts.Iterable size
|
|
@@ -664,105 +716,107 @@ export function size(self) {
|
|
|
664
716
|
*/
|
|
665
717
|
|
|
666
718
|
export function sum(self) {
|
|
667
|
-
return foldLeft_1(
|
|
719
|
+
return foldLeft_1(0, (b, a) => b + a)(self);
|
|
668
720
|
}
|
|
669
721
|
/**
|
|
670
|
-
* @tsplus
|
|
722
|
+
* @tsplus pipeable fncts.Iterable take
|
|
671
723
|
*/
|
|
672
724
|
|
|
673
|
-
export function take(
|
|
674
|
-
return
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
725
|
+
export function take(n) {
|
|
726
|
+
return self => {
|
|
727
|
+
return tsplus_module_1.makeIterable(() => {
|
|
728
|
+
let done = false;
|
|
729
|
+
let i = 0;
|
|
730
|
+
let value;
|
|
731
|
+
const iterator = self[Symbol.iterator]();
|
|
732
|
+
return {
|
|
733
|
+
next() {
|
|
734
|
+
if (done || i >= n) {
|
|
735
|
+
return this.return();
|
|
736
|
+
}
|
|
684
737
|
|
|
685
|
-
|
|
686
|
-
|
|
738
|
+
value = iterator.next();
|
|
739
|
+
i++;
|
|
687
740
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
741
|
+
if (value.done) {
|
|
742
|
+
this.return();
|
|
743
|
+
}
|
|
691
744
|
|
|
692
|
-
|
|
693
|
-
|
|
745
|
+
return value;
|
|
746
|
+
},
|
|
694
747
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
748
|
+
return(value) {
|
|
749
|
+
if (!done) {
|
|
750
|
+
done = true;
|
|
698
751
|
|
|
699
|
-
|
|
700
|
-
|
|
752
|
+
if (typeof iterator.return === "function") {
|
|
753
|
+
iterator.return();
|
|
754
|
+
}
|
|
701
755
|
}
|
|
702
|
-
}
|
|
703
756
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
757
|
+
return {
|
|
758
|
+
done: true,
|
|
759
|
+
value
|
|
760
|
+
};
|
|
761
|
+
}
|
|
709
762
|
|
|
710
|
-
|
|
711
|
-
|
|
763
|
+
};
|
|
764
|
+
});
|
|
765
|
+
};
|
|
712
766
|
}
|
|
713
767
|
/**
|
|
714
|
-
* @tsplus
|
|
768
|
+
* @tsplus pipeable fncts.Iterable zipWith
|
|
715
769
|
*/
|
|
716
770
|
|
|
717
|
-
export function
|
|
718
|
-
return
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
771
|
+
export function zipWith(fb, f) {
|
|
772
|
+
return self => {
|
|
773
|
+
return tsplus_module_1.makeIterable(() => {
|
|
774
|
+
let done = false;
|
|
775
|
+
const ia = self[Symbol.iterator]();
|
|
776
|
+
const ib = fb[Symbol.iterator]();
|
|
777
|
+
return {
|
|
778
|
+
next() {
|
|
779
|
+
if (done) {
|
|
780
|
+
return this.return();
|
|
781
|
+
}
|
|
728
782
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
}
|
|
736
|
-
},
|
|
783
|
+
const va = ia.next();
|
|
784
|
+
const vb = ib.next();
|
|
785
|
+
return va.done || vb.done ? this.return() : {
|
|
786
|
+
done: false,
|
|
787
|
+
value: f(va.value, vb.value)
|
|
788
|
+
};
|
|
789
|
+
},
|
|
737
790
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
791
|
+
return(value) {
|
|
792
|
+
if (!done) {
|
|
793
|
+
done = true;
|
|
741
794
|
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
795
|
+
if (typeof ia.return === "function") {
|
|
796
|
+
ia.return();
|
|
797
|
+
}
|
|
745
798
|
|
|
746
|
-
|
|
747
|
-
|
|
799
|
+
if (typeof ib.return === "function") {
|
|
800
|
+
ib.return();
|
|
801
|
+
}
|
|
748
802
|
}
|
|
749
|
-
}
|
|
750
803
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
804
|
+
return {
|
|
805
|
+
done: true,
|
|
806
|
+
value
|
|
807
|
+
};
|
|
808
|
+
}
|
|
756
809
|
|
|
757
|
-
|
|
758
|
-
|
|
810
|
+
};
|
|
811
|
+
});
|
|
812
|
+
};
|
|
759
813
|
}
|
|
760
814
|
/**
|
|
761
815
|
* @tsplus getter fncts.Iterable zipWithIndex
|
|
762
816
|
*/
|
|
763
817
|
|
|
764
818
|
export function zipWithIndex(self) {
|
|
765
|
-
return tsplus_module_1.
|
|
819
|
+
return tsplus_module_1.makeIterable(() => {
|
|
766
820
|
let n = 0;
|
|
767
821
|
let done = false;
|
|
768
822
|
const iterator = self[Symbol.iterator]();
|