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