@fncts/base 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_cjs/collection/Iterable/api/traverseConc.cjs +43 -0
- package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -0
- package/_cjs/collection/Iterable/api.cjs +857 -0
- package/_cjs/collection/Iterable/api.cjs.map +1 -0
- package/_cjs/collection/Iterable/constructors.cjs +114 -0
- package/_cjs/collection/Iterable/constructors.cjs.map +1 -0
- package/_cjs/collection/Iterable/definition.cjs +9 -0
- package/_cjs/collection/Iterable/definition.cjs.map +1 -0
- package/_cjs/collection/Iterable.cjs +45 -0
- package/_cjs/collection/Iterable.cjs.map +1 -0
- package/_cjs/collection/compat/Array/api.cjs +72 -0
- package/_cjs/collection/compat/Array/api.cjs.map +1 -0
- package/_cjs/collection/compat/Array/definition.cjs +9 -0
- package/_cjs/collection/compat/Array/definition.cjs.map +1 -0
- package/_cjs/collection/compat/Array.cjs +32 -0
- package/_cjs/collection/compat/Array.cjs.map +1 -0
- package/_cjs/collection/compat/ArrayLike/api.cjs +51 -0
- package/_cjs/collection/compat/ArrayLike/api.cjs.map +1 -0
- package/_cjs/collection/compat/ArrayLike/definition.cjs +6 -0
- package/_cjs/collection/compat/ArrayLike/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/api/empty.cjs +16 -0
- package/_cjs/collection/immutable/Conc/api/empty.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/api/makeBy.cjs +34 -0
- package/_cjs/collection/immutable/Conc/api/makeBy.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/api/replicate.cjs +20 -0
- package/_cjs/collection/immutable/Conc/api/replicate.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/api.cjs +1493 -0
- package/_cjs/collection/immutable/Conc/api.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/constructors.cjs +61 -0
- package/_cjs/collection/immutable/Conc/constructors.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/definition.cjs +852 -0
- package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc.cjs +84 -0
- package/_cjs/collection/immutable/Conc.cjs.map +1 -0
- package/_cjs/collection/immutable/Dictionary/api.cjs +84 -0
- package/_cjs/collection/immutable/Dictionary/api.cjs.map +1 -0
- package/_cjs/collection/immutable/Dictionary/definition.cjs +16 -0
- package/_cjs/collection/immutable/Dictionary/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/HashMap/api.cjs +873 -0
- package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -0
- package/_cjs/collection/immutable/HashMap/definition.cjs +135 -0
- package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/HashMap/internal.cjs +403 -0
- package/_cjs/collection/immutable/HashMap/internal.cjs.map +1 -0
- package/_cjs/collection/immutable/HashMap.cjs +32 -0
- package/_cjs/collection/immutable/HashMap.cjs.map +1 -0
- package/_cjs/collection/immutable/HashSet/api.cjs +590 -0
- package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -0
- package/_cjs/collection/immutable/HashSet/definition.cjs +412 -0
- package/_cjs/collection/immutable/HashSet/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/HashSet.cjs +32 -0
- package/_cjs/collection/immutable/HashSet.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +1807 -0
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/constructors.cjs +79 -0
- package/_cjs/collection/immutable/ImmutableArray/constructors.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs +56 -0
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs +187 -0
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray.cjs +58 -0
- package/_cjs/collection/immutable/ImmutableArray.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +634 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs +105 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs +27 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs +72 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/destructors.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +143 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs +71 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs.map +1 -0
- package/_cjs/collection/immutable/List/api/foldLeft.cjs +28 -0
- package/_cjs/collection/immutable/List/api/foldLeft.cjs.map +1 -0
- package/_cjs/collection/immutable/List/api/unsafeTail.cjs +26 -0
- package/_cjs/collection/immutable/List/api/unsafeTail.cjs.map +1 -0
- package/_cjs/collection/immutable/List/api.cjs +443 -0
- package/_cjs/collection/immutable/List/api.cjs.map +1 -0
- package/_cjs/collection/immutable/List/constructors.cjs +92 -0
- package/_cjs/collection/immutable/List/constructors.cjs.map +1 -0
- package/_cjs/collection/immutable/List/definition.cjs +125 -0
- package/_cjs/collection/immutable/List/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/List.cjs +71 -0
- package/_cjs/collection/immutable/List.cjs.map +1 -0
- package/_cjs/collection/immutable/Queue/api.cjs +210 -0
- package/_cjs/collection/immutable/Queue/api.cjs.map +1 -0
- package/_cjs/collection/immutable/Queue/constructors.cjs +33 -0
- package/_cjs/collection/immutable/Queue/constructors.cjs.map +1 -0
- package/_cjs/collection/immutable/Queue/definition.cjs +53 -0
- package/_cjs/collection/immutable/Queue/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/Queue/guards.cjs +20 -0
- package/_cjs/collection/immutable/Queue/guards.cjs.map +1 -0
- package/_cjs/collection/immutable/Queue.cjs +58 -0
- package/_cjs/collection/immutable/Queue.cjs.map +1 -0
- package/_cjs/collection/immutable/SortedMap/api.cjs +691 -0
- package/_cjs/collection/immutable/SortedMap/api.cjs.map +1 -0
- package/_cjs/collection/immutable/SortedMap/definition.cjs +27 -0
- package/_cjs/collection/immutable/SortedMap/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/SortedMap/internal.cjs +530 -0
- package/_cjs/collection/immutable/SortedMap/internal.cjs.map +1 -0
- package/_cjs/collection/immutable/SortedMap/iterator.cjs +394 -0
- package/_cjs/collection/immutable/SortedMap/iterator.cjs.map +1 -0
- package/_cjs/collection/immutable/SortedMap/node.cjs +23 -0
- package/_cjs/collection/immutable/SortedMap/node.cjs.map +1 -0
- package/_cjs/collection/immutable/SortedMap.cjs +71 -0
- package/_cjs/collection/immutable/SortedMap.cjs.map +1 -0
- package/_cjs/collection/immutable/Vector/api.cjs +1525 -0
- package/_cjs/collection/immutable/Vector/api.cjs.map +1 -0
- package/_cjs/collection/immutable/Vector/definition.cjs +105 -0
- package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/Vector/internal.cjs +1665 -0
- package/_cjs/collection/immutable/Vector/internal.cjs.map +1 -0
- package/_cjs/collection/immutable/Vector.cjs +32 -0
- package/_cjs/collection/immutable/Vector.cjs.map +1 -0
- package/_cjs/collection/mutable/HashMap.cjs +390 -0
- package/_cjs/collection/mutable/HashMap.cjs.map +1 -0
- package/_cjs/collection/mutable/HashSet.cjs +308 -0
- package/_cjs/collection/mutable/HashSet.cjs.map +1 -0
- package/_cjs/collection/mutable/ListBuffer.cjs +156 -0
- package/_cjs/collection/mutable/ListBuffer.cjs.map +1 -0
- package/_cjs/collection/mutable/internal.cjs +39 -0
- package/_cjs/collection/mutable/internal.cjs.map +1 -0
- package/_cjs/control/Eval/api/sequenceArray.cjs +22 -0
- package/_cjs/control/Eval/api/sequenceArray.cjs.map +1 -0
- package/_cjs/control/Eval/api.cjs +148 -0
- package/_cjs/control/Eval/api.cjs.map +1 -0
- package/_cjs/control/Eval/constructors.cjs +49 -0
- package/_cjs/control/Eval/constructors.cjs.map +1 -0
- package/_cjs/control/Eval/definition.cjs +68 -0
- package/_cjs/control/Eval/definition.cjs.map +1 -0
- package/_cjs/control/Eval/instance.cjs +52 -0
- package/_cjs/control/Eval/instance.cjs.map +1 -0
- package/_cjs/control/Eval/run.cjs +72 -0
- package/_cjs/control/Eval/run.cjs.map +1 -0
- package/_cjs/control/Eval.cjs +71 -0
- package/_cjs/control/Eval.cjs.map +1 -0
- package/_cjs/control/LazyValue.cjs +38 -0
- package/_cjs/control/LazyValue.cjs.map +1 -0
- package/_cjs/control/Z/api.cjs +667 -0
- package/_cjs/control/Z/api.cjs.map +1 -0
- package/_cjs/control/Z/definition.cjs +227 -0
- package/_cjs/control/Z/definition.cjs.map +1 -0
- package/_cjs/control/Z/instances.cjs +28 -0
- package/_cjs/control/Z/instances.cjs.map +1 -0
- package/_cjs/control/Z/runtime.cjs +387 -0
- package/_cjs/control/Z/runtime.cjs.map +1 -0
- package/_cjs/control/Z.cjs +58 -0
- package/_cjs/control/Z.cjs.map +1 -0
- package/_cjs/data/Byte.cjs +6 -0
- package/_cjs/data/Byte.cjs.map +1 -0
- package/_cjs/data/CaseClass.cjs +127 -0
- package/_cjs/data/CaseClass.cjs.map +1 -0
- package/_cjs/data/Cause/api/fold.cjs +191 -0
- package/_cjs/data/Cause/api/fold.cjs.map +1 -0
- package/_cjs/data/Cause/api/isEmpty.cjs +83 -0
- package/_cjs/data/Cause/api/isEmpty.cjs.map +1 -0
- package/_cjs/data/Cause/api/linearize.cjs +32 -0
- package/_cjs/data/Cause/api/linearize.cjs.map +1 -0
- package/_cjs/data/Cause/api/prettyPrint.cjs +51 -0
- package/_cjs/data/Cause/api/prettyPrint.cjs.map +1 -0
- package/_cjs/data/Cause/api/unified.cjs +168 -0
- package/_cjs/data/Cause/api/unified.cjs.map +1 -0
- package/_cjs/data/Cause/api.cjs +1406 -0
- package/_cjs/data/Cause/api.cjs.map +1 -0
- package/_cjs/data/Cause/definition.cjs +670 -0
- package/_cjs/data/Cause/definition.cjs.map +1 -0
- package/_cjs/data/Cause.cjs +32 -0
- package/_cjs/data/Cause.cjs.map +1 -0
- package/_cjs/data/Const/api.cjs +30 -0
- package/_cjs/data/Const/api.cjs.map +1 -0
- package/_cjs/data/Const/definition.cjs +9 -0
- package/_cjs/data/Const/definition.cjs.map +1 -0
- package/_cjs/data/Const/instances.cjs +50 -0
- package/_cjs/data/Const/instances.cjs.map +1 -0
- package/_cjs/data/Const.cjs +45 -0
- package/_cjs/data/Const.cjs.map +1 -0
- package/_cjs/data/Duration/api.cjs +97 -0
- package/_cjs/data/Duration/api.cjs.map +1 -0
- package/_cjs/data/Duration/definition.cjs +50 -0
- package/_cjs/data/Duration/definition.cjs.map +1 -0
- package/_cjs/data/Duration.cjs +32 -0
- package/_cjs/data/Duration.cjs.map +1 -0
- package/_cjs/data/Either/api/align.cjs +19 -0
- package/_cjs/data/Either/api/align.cjs.map +1 -0
- package/_cjs/data/Either/api/alignWith.cjs +28 -0
- package/_cjs/data/Either/api/alignWith.cjs.map +1 -0
- package/_cjs/data/Either/api.cjs +343 -0
- package/_cjs/data/Either/api.cjs.map +1 -0
- package/_cjs/data/Either/constructors.cjs +95 -0
- package/_cjs/data/Either/constructors.cjs.map +1 -0
- package/_cjs/data/Either/definition.cjs +56 -0
- package/_cjs/data/Either/definition.cjs.map +1 -0
- package/_cjs/data/Either/destructors.cjs +24 -0
- package/_cjs/data/Either/destructors.cjs.map +1 -0
- package/_cjs/data/Either/instances.cjs +85 -0
- package/_cjs/data/Either/instances.cjs.map +1 -0
- package/_cjs/data/Either.cjs +71 -0
- package/_cjs/data/Either.cjs.map +1 -0
- package/_cjs/data/Environment/api.cjs +116 -0
- package/_cjs/data/Environment/api.cjs.map +1 -0
- package/_cjs/data/Environment/definition.cjs +60 -0
- package/_cjs/data/Environment/definition.cjs.map +1 -0
- package/_cjs/data/Environment.cjs +32 -0
- package/_cjs/data/Environment.cjs.map +1 -0
- package/_cjs/data/ExecutionStrategy.cjs +73 -0
- package/_cjs/data/ExecutionStrategy.cjs.map +1 -0
- package/_cjs/data/Exit/api.cjs +259 -0
- package/_cjs/data/Exit/api.cjs.map +1 -0
- package/_cjs/data/Exit/constructors.cjs +93 -0
- package/_cjs/data/Exit/constructors.cjs.map +1 -0
- package/_cjs/data/Exit/definition.cjs +139 -0
- package/_cjs/data/Exit/definition.cjs.map +1 -0
- package/_cjs/data/Exit.cjs +45 -0
- package/_cjs/data/Exit.cjs.map +1 -0
- package/_cjs/data/FiberId/api.cjs +72 -0
- package/_cjs/data/FiberId/api.cjs.map +1 -0
- package/_cjs/data/FiberId/constructors.cjs +41 -0
- package/_cjs/data/FiberId/constructors.cjs.map +1 -0
- package/_cjs/data/FiberId/definition.cjs +130 -0
- package/_cjs/data/FiberId/definition.cjs.map +1 -0
- package/_cjs/data/FiberId.cjs +45 -0
- package/_cjs/data/FiberId.cjs.map +1 -0
- package/_cjs/data/Identity/api.cjs +42 -0
- package/_cjs/data/Identity/api.cjs.map +1 -0
- package/_cjs/data/Identity/definition.cjs +9 -0
- package/_cjs/data/Identity/definition.cjs.map +1 -0
- package/_cjs/data/Identity/instances.cjs +50 -0
- package/_cjs/data/Identity/instances.cjs.map +1 -0
- package/_cjs/data/Identity.cjs +45 -0
- package/_cjs/data/Identity.cjs.map +1 -0
- package/_cjs/data/Maybe/api.cjs +265 -0
- package/_cjs/data/Maybe/api.cjs.map +1 -0
- package/_cjs/data/Maybe/constructors.cjs +117 -0
- package/_cjs/data/Maybe/constructors.cjs.map +1 -0
- package/_cjs/data/Maybe/definition.cjs +128 -0
- package/_cjs/data/Maybe/definition.cjs.map +1 -0
- package/_cjs/data/Maybe/destructors.cjs +19 -0
- package/_cjs/data/Maybe/destructors.cjs.map +1 -0
- package/_cjs/data/Maybe/instances.cjs +68 -0
- package/_cjs/data/Maybe/instances.cjs.map +1 -0
- package/_cjs/data/Maybe.cjs +71 -0
- package/_cjs/data/Maybe.cjs.map +1 -0
- package/_cjs/data/Newtype.cjs +27 -0
- package/_cjs/data/Newtype.cjs.map +1 -0
- package/_cjs/data/Patch/api.cjs +137 -0
- package/_cjs/data/Patch/api.cjs.map +1 -0
- package/_cjs/data/Patch/definition.cjs +88 -0
- package/_cjs/data/Patch/definition.cjs.map +1 -0
- package/_cjs/data/Patch.cjs +32 -0
- package/_cjs/data/Patch.cjs.map +1 -0
- package/_cjs/data/Predicate/api.cjs +41 -0
- package/_cjs/data/Predicate/api.cjs.map +1 -0
- package/_cjs/data/Predicate/definition.cjs +6 -0
- package/_cjs/data/Predicate/definition.cjs.map +1 -0
- package/_cjs/data/Predicate.cjs +32 -0
- package/_cjs/data/Predicate.cjs.map +1 -0
- package/_cjs/data/Refinement/api.cjs +43 -0
- package/_cjs/data/Refinement/api.cjs.map +1 -0
- package/_cjs/data/Refinement/definition.cjs +6 -0
- package/_cjs/data/Refinement/definition.cjs.map +1 -0
- package/_cjs/data/Refinement.cjs +32 -0
- package/_cjs/data/Refinement.cjs.map +1 -0
- package/_cjs/data/Struct/api.cjs +37 -0
- package/_cjs/data/Struct/api.cjs.map +1 -0
- package/_cjs/data/Struct/definition.cjs +16 -0
- package/_cjs/data/Struct/definition.cjs.map +1 -0
- package/_cjs/data/Tag/constructors.cjs +20 -0
- package/_cjs/data/Tag/constructors.cjs.map +1 -0
- package/_cjs/data/Tag/definition.cjs +57 -0
- package/_cjs/data/Tag/definition.cjs.map +1 -0
- package/_cjs/data/Tag.cjs +32 -0
- package/_cjs/data/Tag.cjs.map +1 -0
- package/_cjs/data/These/constructors.cjs +37 -0
- package/_cjs/data/These/constructors.cjs.map +1 -0
- package/_cjs/data/These/definition.cjs +63 -0
- package/_cjs/data/These/definition.cjs.map +1 -0
- package/_cjs/data/These/destructors.cjs +29 -0
- package/_cjs/data/These/destructors.cjs.map +1 -0
- package/_cjs/data/These.cjs +45 -0
- package/_cjs/data/These.cjs.map +1 -0
- package/_cjs/data/Trace/api.cjs +35 -0
- package/_cjs/data/Trace/api.cjs.map +1 -0
- package/_cjs/data/Trace/constructors.cjs +32 -0
- package/_cjs/data/Trace/constructors.cjs.map +1 -0
- package/_cjs/data/Trace/definition.cjs +21 -0
- package/_cjs/data/Trace/definition.cjs.map +1 -0
- package/_cjs/data/Trace.cjs +45 -0
- package/_cjs/data/Trace.cjs.map +1 -0
- package/_cjs/data/TraceElement/definition.cjs +75 -0
- package/_cjs/data/TraceElement/definition.cjs.map +1 -0
- package/_cjs/data/TraceElement.cjs +19 -0
- package/_cjs/data/TraceElement.cjs.map +1 -0
- package/_cjs/data/exceptions/ArrayIndexOutOfBoundsError.cjs +20 -0
- package/_cjs/data/exceptions/ArrayIndexOutOfBoundsError.cjs.map +1 -0
- package/_cjs/data/exceptions/IllegalArgumentError.cjs +21 -0
- package/_cjs/data/exceptions/IllegalArgumentError.cjs.map +1 -0
- package/_cjs/data/exceptions/IllegalStateError.cjs +20 -0
- package/_cjs/data/exceptions/IllegalStateError.cjs.map +1 -0
- package/_cjs/data/exceptions/IndexOutOfBoundsError.cjs +20 -0
- package/_cjs/data/exceptions/IndexOutOfBoundsError.cjs.map +1 -0
- package/_cjs/data/exceptions/InterruptedException.cjs +27 -0
- package/_cjs/data/exceptions/InterruptedException.cjs.map +1 -0
- package/_cjs/data/exceptions/InvalidCapacityError.cjs +23 -0
- package/_cjs/data/exceptions/InvalidCapacityError.cjs.map +1 -0
- package/_cjs/data/exceptions/NoSuchElementError.cjs +20 -0
- package/_cjs/data/exceptions/NoSuchElementError.cjs.map +1 -0
- package/_cjs/data/exceptions.cjs +97 -0
- package/_cjs/data/exceptions.cjs.map +1 -0
- package/_cjs/data/function/api.cjs +52 -0
- package/_cjs/data/function/api.cjs.map +1 -0
- package/_cjs/data/function/definition.cjs +6 -0
- package/_cjs/data/function/definition.cjs.map +1 -0
- package/_cjs/data/function/pipe.cjs +74 -0
- package/_cjs/data/function/pipe.cjs.map +1 -0
- package/_cjs/data/function.cjs +45 -0
- package/_cjs/data/function.cjs.map +1 -0
- package/_cjs/data/number/api.cjs +14 -0
- package/_cjs/data/number/api.cjs.map +1 -0
- package/_cjs/data/number/definition.cjs +6 -0
- package/_cjs/data/number/definition.cjs.map +1 -0
- package/_cjs/data/number/instances.cjs +34 -0
- package/_cjs/data/number/instances.cjs.map +1 -0
- package/_cjs/data/number.cjs +45 -0
- package/_cjs/data/number.cjs.map +1 -0
- package/_cjs/data/object/definition.cjs +6 -0
- package/_cjs/data/object/definition.cjs.map +1 -0
- package/_cjs/data/object.cjs +19 -0
- package/_cjs/data/object.cjs.map +1 -0
- package/_cjs/data/string/api.cjs +254 -0
- package/_cjs/data/string/api.cjs.map +1 -0
- package/_cjs/data/string/definition.cjs +6 -0
- package/_cjs/data/string/definition.cjs.map +1 -0
- package/_cjs/data/string/instances.cjs +55 -0
- package/_cjs/data/string/instances.cjs.map +1 -0
- package/_cjs/data/string.cjs +45 -0
- package/_cjs/data/string.cjs.map +1 -0
- package/_cjs/global/api.cjs +11 -0
- package/_cjs/global/api.cjs.map +1 -0
- package/_cjs/internal/AtomicBoolean.cjs +18 -0
- package/_cjs/internal/AtomicBoolean.cjs.map +1 -0
- package/_cjs/internal/AtomicNumber.cjs +36 -0
- package/_cjs/internal/AtomicNumber.cjs.map +1 -0
- package/_cjs/internal/AtomicReference.cjs +40 -0
- package/_cjs/internal/AtomicReference.cjs.map +1 -0
- package/_cjs/internal/Stack.cjs +69 -0
- package/_cjs/internal/Stack.cjs.map +1 -0
- package/_cjs/optics/At/api.cjs +24 -0
- package/_cjs/optics/At/api.cjs.map +1 -0
- package/_cjs/optics/At/definition.cjs +34 -0
- package/_cjs/optics/At/definition.cjs.map +1 -0
- package/_cjs/optics/At.cjs +32 -0
- package/_cjs/optics/At.cjs.map +1 -0
- package/_cjs/optics/Fold/definition.cjs +21 -0
- package/_cjs/optics/Fold/definition.cjs.map +1 -0
- package/_cjs/optics/Fold.cjs +19 -0
- package/_cjs/optics/Fold.cjs.map +1 -0
- package/_cjs/optics/Getter/definition.cjs +22 -0
- package/_cjs/optics/Getter/definition.cjs.map +1 -0
- package/_cjs/optics/Getter.cjs +19 -0
- package/_cjs/optics/Getter.cjs.map +1 -0
- package/_cjs/optics/Index/api.cjs +37 -0
- package/_cjs/optics/Index/api.cjs.map +1 -0
- package/_cjs/optics/Index/definition.cjs +20 -0
- package/_cjs/optics/Index/definition.cjs.map +1 -0
- package/_cjs/optics/Index.cjs +32 -0
- package/_cjs/optics/Index.cjs.map +1 -0
- package/_cjs/optics/Iso/api.cjs +25 -0
- package/_cjs/optics/Iso/api.cjs.map +1 -0
- package/_cjs/optics/Iso/definition.cjs +54 -0
- package/_cjs/optics/Iso/definition.cjs.map +1 -0
- package/_cjs/optics/Iso.cjs +32 -0
- package/_cjs/optics/Iso.cjs.map +1 -0
- package/_cjs/optics/Lens/api.cjs +171 -0
- package/_cjs/optics/Lens/api.cjs.map +1 -0
- package/_cjs/optics/Lens/definition.cjs +50 -0
- package/_cjs/optics/Lens/definition.cjs.map +1 -0
- package/_cjs/optics/Lens.cjs +32 -0
- package/_cjs/optics/Lens.cjs.map +1 -0
- package/_cjs/optics/Optional/api/compose.cjs +27 -0
- package/_cjs/optics/Optional/api/compose.cjs.map +1 -0
- package/_cjs/optics/Optional/definition.cjs +57 -0
- package/_cjs/optics/Optional/definition.cjs.map +1 -0
- package/_cjs/optics/Optional.cjs +32 -0
- package/_cjs/optics/Optional.cjs.map +1 -0
- package/_cjs/optics/Prism/api/compose.cjs +29 -0
- package/_cjs/optics/Prism/api/compose.cjs.map +1 -0
- package/_cjs/optics/Prism/api/fromNullable.cjs +27 -0
- package/_cjs/optics/Prism/api/fromNullable.cjs.map +1 -0
- package/_cjs/optics/Prism/api/just.cjs +29 -0
- package/_cjs/optics/Prism/api/just.cjs.map +1 -0
- package/_cjs/optics/Prism/definition.cjs +48 -0
- package/_cjs/optics/Prism/definition.cjs.map +1 -0
- package/_cjs/optics/Prism.cjs +58 -0
- package/_cjs/optics/Prism.cjs.map +1 -0
- package/_cjs/optics/Setter/definition.cjs +33 -0
- package/_cjs/optics/Setter/definition.cjs.map +1 -0
- package/_cjs/optics/Setter.cjs +19 -0
- package/_cjs/optics/Setter.cjs.map +1 -0
- package/_cjs/optics/Traversal/api/compose.cjs +22 -0
- package/_cjs/optics/Traversal/api/compose.cjs.map +1 -0
- package/_cjs/optics/Traversal/api/fromTraversable.cjs +22 -0
- package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -0
- package/_cjs/optics/Traversal/definition.cjs +53 -0
- package/_cjs/optics/Traversal/definition.cjs.map +1 -0
- package/_cjs/optics/Traversal.cjs +45 -0
- package/_cjs/optics/Traversal.cjs.map +1 -0
- package/_cjs/typeclass/Align.cjs +29 -0
- package/_cjs/typeclass/Align.cjs.map +1 -0
- package/_cjs/typeclass/Alt.cjs +26 -0
- package/_cjs/typeclass/Alt.cjs.map +1 -0
- package/_cjs/typeclass/Alternative.cjs +32 -0
- package/_cjs/typeclass/Alternative.cjs.map +1 -0
- package/_cjs/typeclass/Applicative.cjs +31 -0
- package/_cjs/typeclass/Applicative.cjs.map +1 -0
- package/_cjs/typeclass/ApplicativeExcept.cjs +56 -0
- package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -0
- package/_cjs/typeclass/Apply.cjs +136 -0
- package/_cjs/typeclass/Apply.cjs.map +1 -0
- package/_cjs/typeclass/Chain.cjs +35 -0
- package/_cjs/typeclass/Chain.cjs.map +1 -0
- package/_cjs/typeclass/Closure.cjs +21 -0
- package/_cjs/typeclass/Closure.cjs.map +1 -0
- package/_cjs/typeclass/Eq.cjs +21 -0
- package/_cjs/typeclass/Eq.cjs.map +1 -0
- package/_cjs/typeclass/Equatable/api.cjs +45 -0
- package/_cjs/typeclass/Equatable/api.cjs.map +1 -0
- package/_cjs/typeclass/Equatable/definition.cjs +28 -0
- package/_cjs/typeclass/Equatable/definition.cjs.map +1 -0
- package/_cjs/typeclass/Equatable/fast-equals.cjs +520 -0
- package/_cjs/typeclass/Equatable/fast-equals.cjs.map +1 -0
- package/_cjs/typeclass/Equatable.cjs +45 -0
- package/_cjs/typeclass/Equatable.cjs.map +1 -0
- package/_cjs/typeclass/Fail.cjs +22 -0
- package/_cjs/typeclass/Fail.cjs.map +1 -0
- package/_cjs/typeclass/Filterable.cjs +32 -0
- package/_cjs/typeclass/Filterable.cjs.map +1 -0
- package/_cjs/typeclass/FilterableWithIndex.cjs +35 -0
- package/_cjs/typeclass/FilterableWithIndex.cjs.map +1 -0
- package/_cjs/typeclass/Foldable.cjs +34 -0
- package/_cjs/typeclass/Foldable.cjs.map +1 -0
- package/_cjs/typeclass/FoldableWithIndex.cjs +36 -0
- package/_cjs/typeclass/FoldableWithIndex.cjs.map +1 -0
- package/_cjs/typeclass/Functor.cjs +30 -0
- package/_cjs/typeclass/Functor.cjs.map +1 -0
- package/_cjs/typeclass/FunctorWithIndex.cjs +30 -0
- package/_cjs/typeclass/FunctorWithIndex.cjs.map +1 -0
- package/_cjs/typeclass/Has.cjs +17 -0
- package/_cjs/typeclass/Has.cjs.map +1 -0
- package/_cjs/typeclass/Hash.cjs +18 -0
- package/_cjs/typeclass/Hash.cjs.map +1 -0
- package/_cjs/typeclass/HashEq.cjs +51 -0
- package/_cjs/typeclass/HashEq.cjs.map +1 -0
- package/_cjs/typeclass/Hashable/definition.cjs +28 -0
- package/_cjs/typeclass/Hashable/definition.cjs.map +1 -0
- package/_cjs/typeclass/Hashable/hash.cjs +267 -0
- package/_cjs/typeclass/Hashable/hash.cjs.map +1 -0
- package/_cjs/typeclass/Hashable.cjs +32 -0
- package/_cjs/typeclass/Hashable.cjs.map +1 -0
- package/_cjs/typeclass/Monad.cjs +31 -0
- package/_cjs/typeclass/Monad.cjs.map +1 -0
- package/_cjs/typeclass/MonadExcept.cjs +36 -0
- package/_cjs/typeclass/MonadExcept.cjs.map +1 -0
- package/_cjs/typeclass/Monoid.cjs +27 -0
- package/_cjs/typeclass/Monoid.cjs.map +1 -0
- package/_cjs/typeclass/Nil.cjs +6 -0
- package/_cjs/typeclass/Nil.cjs.map +1 -0
- package/_cjs/typeclass/Ord/api/contramap.cjs +19 -0
- package/_cjs/typeclass/Ord/api/contramap.cjs.map +1 -0
- package/_cjs/typeclass/Ord/api/max.cjs +15 -0
- package/_cjs/typeclass/Ord/api/max.cjs.map +1 -0
- package/_cjs/typeclass/Ord/api/min.cjs +15 -0
- package/_cjs/typeclass/Ord/api/min.cjs.map +1 -0
- package/_cjs/typeclass/Ord/api.cjs +45 -0
- package/_cjs/typeclass/Ord/api.cjs.map +1 -0
- package/_cjs/typeclass/Ord/definition.cjs +28 -0
- package/_cjs/typeclass/Ord/definition.cjs.map +1 -0
- package/_cjs/typeclass/Ord/instances.cjs +52 -0
- package/_cjs/typeclass/Ord/instances.cjs.map +1 -0
- package/_cjs/typeclass/Ord.cjs +45 -0
- package/_cjs/typeclass/Ord.cjs.map +1 -0
- package/_cjs/typeclass/Ordering.cjs +57 -0
- package/_cjs/typeclass/Ordering.cjs.map +1 -0
- package/_cjs/typeclass/Pointed.cjs +25 -0
- package/_cjs/typeclass/Pointed.cjs.map +1 -0
- package/_cjs/typeclass/Semialign.cjs +121 -0
- package/_cjs/typeclass/Semialign.cjs.map +1 -0
- package/_cjs/typeclass/Semigroup/api.cjs +37 -0
- package/_cjs/typeclass/Semigroup/api.cjs.map +1 -0
- package/_cjs/typeclass/Semigroup/definition.cjs +18 -0
- package/_cjs/typeclass/Semigroup/definition.cjs.map +1 -0
- package/_cjs/typeclass/Semigroup.cjs +32 -0
- package/_cjs/typeclass/Semigroup.cjs.map +1 -0
- package/_cjs/typeclass/Semimonoidal.cjs +24 -0
- package/_cjs/typeclass/Semimonoidal.cjs.map +1 -0
- package/_cjs/typeclass/Showable/definition.cjs +32 -0
- package/_cjs/typeclass/Showable/definition.cjs.map +1 -0
- package/_cjs/typeclass/Showable/show.cjs +837 -0
- package/_cjs/typeclass/Showable/show.cjs.map +1 -0
- package/_cjs/typeclass/Showable/styles.cjs +39 -0
- package/_cjs/typeclass/Showable/styles.cjs.map +1 -0
- package/_cjs/typeclass/Showable/util.cjs +433 -0
- package/_cjs/typeclass/Showable/util.cjs.map +1 -0
- package/_cjs/typeclass/Showable.cjs +32 -0
- package/_cjs/typeclass/Showable.cjs.map +1 -0
- package/_cjs/typeclass/Traversable.cjs +54 -0
- package/_cjs/typeclass/Traversable.cjs.map +1 -0
- package/_cjs/typeclass/TraversableWithIndex.cjs +49 -0
- package/_cjs/typeclass/TraversableWithIndex.cjs.map +1 -0
- package/_cjs/typeclass/Witherable.cjs +68 -0
- package/_cjs/typeclass/Witherable.cjs.map +1 -0
- package/_cjs/typeclass/WitherableWithIndex.cjs +76 -0
- package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -0
- package/_cjs/typeclass/builtin/Symbol.cjs +6 -0
- package/_cjs/typeclass/builtin/Symbol.cjs.map +1 -0
- package/_cjs/typeclass/builtin.cjs +19 -0
- package/_cjs/typeclass/builtin.cjs.map +1 -0
- package/_cjs/typeclass.cjs +474 -0
- package/_cjs/typeclass.cjs.map +1 -0
- package/_cjs/types/extractions.cjs +6 -0
- package/_cjs/types/extractions.cjs.map +1 -0
- package/_cjs/types/test.cjs +6 -0
- package/_cjs/types/test.cjs.map +1 -0
- package/_cjs/types/utility.cjs +6 -0
- package/_cjs/types/utility.cjs.map +1 -0
- package/_cjs/types.cjs +45 -0
- package/_cjs/types.cjs.map +1 -0
- package/_cjs/util/AnsiFormat.cjs +338 -0
- package/_cjs/util/AnsiFormat.cjs.map +1 -0
- package/_cjs/util/PCGRandom.cjs +177 -0
- package/_cjs/util/PCGRandom.cjs.map +1 -0
- package/_cjs/util/assert.cjs +24 -0
- package/_cjs/util/assert.cjs.map +1 -0
- package/_cjs/util/pattern.cjs +23 -0
- package/_cjs/util/pattern.cjs.map +1 -0
- package/_cjs/util/predicates.cjs +157 -0
- package/_cjs/util/predicates.cjs.map +1 -0
- package/_cjs/util/rand/Random.cjs +103 -0
- package/_cjs/util/rand/Random.cjs.map +1 -0
- package/_cjs/util/rand/distribution/Distribution.cjs +6 -0
- package/_cjs/util/rand/distribution/Distribution.cjs.map +1 -0
- package/_cjs/util/rand/distribution/UniformArrayIntDistribution.cjs +32 -0
- package/_cjs/util/rand/distribution/UniformArrayIntDistribution.cjs.map +1 -0
- package/_cjs/util/rand/distribution/UniformBigIntDistribution.cjs +50 -0
- package/_cjs/util/rand/distribution/UniformBigIntDistribution.cjs.map +1 -0
- package/_cjs/util/rand/distribution/UniformIntDistribution.cjs +70 -0
- package/_cjs/util/rand/distribution/UniformIntDistribution.cjs.map +1 -0
- package/_cjs/util/rand/distribution/internals/ArrayInt.cjs +220 -0
- package/_cjs/util/rand/distribution/internals/ArrayInt.cjs.map +1 -0
- package/_cjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.cjs +44 -0
- package/_cjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.cjs.map +1 -0
- package/_cjs/util/rand/distribution/internals/UniformIntDistributionInternal.cjs +56 -0
- package/_cjs/util/rand/distribution/internals/UniformIntDistributionInternal.cjs.map +1 -0
- package/_cjs/util/rand/generator/MersenneTwister.cjs +115 -0
- package/_cjs/util/rand/generator/MersenneTwister.cjs.map +1 -0
- package/_cjs/util/rand/generator/RandomGenerator.cjs +23 -0
- package/_cjs/util/rand/generator/RandomGenerator.cjs.map +1 -0
- package/_cjs/util/rand.cjs +88 -0
- package/_cjs/util/rand.cjs.map +1 -0
- package/_mjs/collection/Iterable/api/traverseConc.mjs +28 -0
- package/_mjs/collection/Iterable/api/traverseConc.mjs.map +1 -0
- package/_mjs/collection/Iterable/api.mjs +784 -0
- package/_mjs/collection/Iterable/api.mjs.map +1 -0
- package/_mjs/collection/Iterable/constructors.mjs +100 -0
- package/_mjs/collection/Iterable/constructors.mjs.map +1 -0
- package/_mjs/collection/Iterable/definition.mjs +2 -0
- package/_mjs/collection/Iterable/definition.mjs.map +1 -0
- package/_mjs/collection/Iterable.mjs +5 -0
- package/_mjs/collection/Iterable.mjs.map +1 -0
- package/_mjs/collection/compat/Array/api.mjs +56 -0
- package/_mjs/collection/compat/Array/api.mjs.map +1 -0
- package/_mjs/collection/compat/Array/definition.mjs +2 -0
- package/_mjs/collection/compat/Array/definition.mjs.map +1 -0
- package/_mjs/collection/compat/Array.mjs +4 -0
- package/_mjs/collection/compat/Array.mjs.map +1 -0
- package/_mjs/collection/compat/ArrayLike/api.mjs +40 -0
- package/_mjs/collection/compat/ArrayLike/api.mjs.map +1 -0
- package/_mjs/collection/compat/ArrayLike/definition.mjs +2 -0
- package/_mjs/collection/compat/ArrayLike/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/api/empty.mjs +9 -0
- package/_mjs/collection/immutable/Conc/api/empty.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/api/makeBy.mjs +22 -0
- package/_mjs/collection/immutable/Conc/api/makeBy.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/api/replicate.mjs +9 -0
- package/_mjs/collection/immutable/Conc/api/replicate.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/api.mjs +1340 -0
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/constructors.mjs +40 -0
- package/_mjs/collection/immutable/Conc/constructors.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/definition.mjs +798 -0
- package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc.mjs +10 -0
- package/_mjs/collection/immutable/Conc.mjs.map +1 -0
- package/_mjs/collection/immutable/Dictionary/api.mjs +62 -0
- package/_mjs/collection/immutable/Dictionary/api.mjs.map +1 -0
- package/_mjs/collection/immutable/Dictionary/definition.mjs +3 -0
- package/_mjs/collection/immutable/Dictionary/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/HashMap/api.mjs +724 -0
- package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -0
- package/_mjs/collection/immutable/HashMap/definition.mjs +111 -0
- package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/HashMap/internal.mjs +352 -0
- package/_mjs/collection/immutable/HashMap/internal.mjs.map +1 -0
- package/_mjs/collection/immutable/HashMap.mjs +4 -0
- package/_mjs/collection/immutable/HashMap.mjs.map +1 -0
- package/_mjs/collection/immutable/HashSet/api.mjs +515 -0
- package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -0
- package/_mjs/collection/immutable/HashSet/definition.mjs +370 -0
- package/_mjs/collection/immutable/HashSet/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/HashSet.mjs +4 -0
- package/_mjs/collection/immutable/HashSet.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +1514 -0
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/constructors.mjs +56 -0
- package/_mjs/collection/immutable/ImmutableArray/constructors.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs +34 -0
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs +142 -0
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray.mjs +6 -0
- package/_mjs/collection/immutable/ImmutableArray.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +521 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs +76 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs +14 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs +52 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/destructors.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +110 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs +7 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs.map +1 -0
- package/_mjs/collection/immutable/List/api/foldLeft.mjs +17 -0
- package/_mjs/collection/immutable/List/api/foldLeft.mjs.map +1 -0
- package/_mjs/collection/immutable/List/api/unsafeTail.mjs +14 -0
- package/_mjs/collection/immutable/List/api/unsafeTail.mjs.map +1 -0
- package/_mjs/collection/immutable/List/api.mjs +388 -0
- package/_mjs/collection/immutable/List/api.mjs.map +1 -0
- package/_mjs/collection/immutable/List/constructors.mjs +71 -0
- package/_mjs/collection/immutable/List/constructors.mjs.map +1 -0
- package/_mjs/collection/immutable/List/definition.mjs +106 -0
- package/_mjs/collection/immutable/List/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/List.mjs +9 -0
- package/_mjs/collection/immutable/List.mjs.map +1 -0
- package/_mjs/collection/immutable/Queue/api.mjs +165 -0
- package/_mjs/collection/immutable/Queue/api.mjs.map +1 -0
- package/_mjs/collection/immutable/Queue/constructors.mjs +18 -0
- package/_mjs/collection/immutable/Queue/constructors.mjs.map +1 -0
- package/_mjs/collection/immutable/Queue/definition.mjs +38 -0
- package/_mjs/collection/immutable/Queue/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/Queue/guards.mjs +9 -0
- package/_mjs/collection/immutable/Queue/guards.mjs.map +1 -0
- package/_mjs/collection/immutable/Queue.mjs +6 -0
- package/_mjs/collection/immutable/Queue.mjs.map +1 -0
- package/_mjs/collection/immutable/SortedMap/api.mjs +631 -0
- package/_mjs/collection/immutable/SortedMap/api.mjs.map +1 -0
- package/_mjs/collection/immutable/SortedMap/definition.mjs +18 -0
- package/_mjs/collection/immutable/SortedMap/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/SortedMap/internal.mjs +515 -0
- package/_mjs/collection/immutable/SortedMap/internal.mjs.map +1 -0
- package/_mjs/collection/immutable/SortedMap/iterator.mjs +373 -0
- package/_mjs/collection/immutable/SortedMap/iterator.mjs.map +1 -0
- package/_mjs/collection/immutable/SortedMap/node.mjs +13 -0
- package/_mjs/collection/immutable/SortedMap/node.mjs.map +1 -0
- package/_mjs/collection/immutable/SortedMap.mjs +7 -0
- package/_mjs/collection/immutable/SortedMap.mjs.map +1 -0
- package/_mjs/collection/immutable/Vector/api.mjs +1367 -0
- package/_mjs/collection/immutable/Vector/api.mjs.map +1 -0
- package/_mjs/collection/immutable/Vector/definition.mjs +81 -0
- package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/Vector/internal.mjs +1557 -0
- package/_mjs/collection/immutable/Vector/internal.mjs.map +1 -0
- package/_mjs/collection/immutable/Vector.mjs +4 -0
- package/_mjs/collection/immutable/Vector.mjs.map +1 -0
- package/_mjs/collection/mutable/HashMap.mjs +370 -0
- package/_mjs/collection/mutable/HashMap.mjs.map +1 -0
- package/_mjs/collection/mutable/HashSet.mjs +290 -0
- package/_mjs/collection/mutable/HashSet.mjs.map +1 -0
- package/_mjs/collection/mutable/ListBuffer.mjs +141 -0
- package/_mjs/collection/mutable/ListBuffer.mjs.map +1 -0
- package/_mjs/collection/mutable/internal.mjs +26 -0
- package/_mjs/collection/mutable/internal.mjs.map +1 -0
- package/_mjs/control/Eval/api/sequenceArray.mjs +10 -0
- package/_mjs/control/Eval/api/sequenceArray.mjs.map +1 -0
- package/_mjs/control/Eval/api.mjs +98 -0
- package/_mjs/control/Eval/api.mjs.map +1 -0
- package/_mjs/control/Eval/constructors.mjs +35 -0
- package/_mjs/control/Eval/constructors.mjs.map +1 -0
- package/_mjs/control/Eval/definition.mjs +47 -0
- package/_mjs/control/Eval/definition.mjs.map +1 -0
- package/_mjs/control/Eval/instance.mjs +33 -0
- package/_mjs/control/Eval/instance.mjs.map +1 -0
- package/_mjs/control/Eval/run.mjs +60 -0
- package/_mjs/control/Eval/run.mjs.map +1 -0
- package/_mjs/control/Eval.mjs +7 -0
- package/_mjs/control/Eval.mjs.map +1 -0
- package/_mjs/control/LazyValue.mjs +27 -0
- package/_mjs/control/LazyValue.mjs.map +1 -0
- package/_mjs/control/Z/api.mjs +541 -0
- package/_mjs/control/Z/api.mjs.map +1 -0
- package/_mjs/control/Z/definition.mjs +169 -0
- package/_mjs/control/Z/definition.mjs.map +1 -0
- package/_mjs/control/Z/instances.mjs +14 -0
- package/_mjs/control/Z/instances.mjs.map +1 -0
- package/_mjs/control/Z/runtime.mjs +354 -0
- package/_mjs/control/Z/runtime.mjs.map +1 -0
- package/_mjs/control/Z.mjs +6 -0
- package/_mjs/control/Z.mjs.map +1 -0
- package/_mjs/data/Byte.mjs +2 -0
- package/_mjs/data/Byte.mjs.map +1 -0
- package/_mjs/data/CaseClass.mjs +103 -0
- package/_mjs/data/CaseClass.mjs.map +1 -0
- package/_mjs/data/Cause/api/fold.mjs +174 -0
- package/_mjs/data/Cause/api/fold.mjs.map +1 -0
- package/_mjs/data/Cause/api/isEmpty.mjs +72 -0
- package/_mjs/data/Cause/api/isEmpty.mjs.map +1 -0
- package/_mjs/data/Cause/api/linearize.mjs +19 -0
- package/_mjs/data/Cause/api/linearize.mjs.map +1 -0
- package/_mjs/data/Cause/api/prettyPrint.mjs +37 -0
- package/_mjs/data/Cause/api/prettyPrint.mjs.map +1 -0
- package/_mjs/data/Cause/api/unified.mjs +150 -0
- package/_mjs/data/Cause/api/unified.mjs.map +1 -0
- package/_mjs/data/Cause/api.mjs +1200 -0
- package/_mjs/data/Cause/api.mjs.map +1 -0
- package/_mjs/data/Cause/definition.mjs +612 -0
- package/_mjs/data/Cause/definition.mjs.map +1 -0
- package/_mjs/data/Cause.mjs +4 -0
- package/_mjs/data/Cause.mjs.map +1 -0
- package/_mjs/data/Const/api.mjs +17 -0
- package/_mjs/data/Const/api.mjs.map +1 -0
- package/_mjs/data/Const/definition.mjs +2 -0
- package/_mjs/data/Const/definition.mjs.map +1 -0
- package/_mjs/data/Const/instances.mjs +32 -0
- package/_mjs/data/Const/instances.mjs.map +1 -0
- package/_mjs/data/Const.mjs +5 -0
- package/_mjs/data/Const.mjs.map +1 -0
- package/_mjs/data/Duration/api.mjs +70 -0
- package/_mjs/data/Duration/api.mjs.map +1 -0
- package/_mjs/data/Duration/definition.mjs +29 -0
- package/_mjs/data/Duration/definition.mjs.map +1 -0
- package/_mjs/data/Duration.mjs +4 -0
- package/_mjs/data/Duration.mjs.map +1 -0
- package/_mjs/data/Either/api/align.mjs +6 -0
- package/_mjs/data/Either/api/align.mjs.map +1 -0
- package/_mjs/data/Either/api/alignWith.mjs +16 -0
- package/_mjs/data/Either/api/alignWith.mjs.map +1 -0
- package/_mjs/data/Either/api.mjs +211 -0
- package/_mjs/data/Either/api.mjs.map +1 -0
- package/_mjs/data/Either/constructors.mjs +70 -0
- package/_mjs/data/Either/constructors.mjs.map +1 -0
- package/_mjs/data/Either/definition.mjs +40 -0
- package/_mjs/data/Either/definition.mjs.map +1 -0
- package/_mjs/data/Either/destructors.mjs +17 -0
- package/_mjs/data/Either/destructors.mjs.map +1 -0
- package/_mjs/data/Either/instances.mjs +66 -0
- package/_mjs/data/Either/instances.mjs.map +1 -0
- package/_mjs/data/Either.mjs +7 -0
- package/_mjs/data/Either.mjs.map +1 -0
- package/_mjs/data/Environment/api.mjs +87 -0
- package/_mjs/data/Environment/api.mjs.map +1 -0
- package/_mjs/data/Environment/definition.mjs +38 -0
- package/_mjs/data/Environment/definition.mjs.map +1 -0
- package/_mjs/data/Environment.mjs +4 -0
- package/_mjs/data/Environment.mjs.map +1 -0
- package/_mjs/data/ExecutionStrategy.mjs +57 -0
- package/_mjs/data/ExecutionStrategy.mjs.map +1 -0
- package/_mjs/data/Exit/api.mjs +206 -0
- package/_mjs/data/Exit/api.mjs.map +1 -0
- package/_mjs/data/Exit/constructors.mjs +65 -0
- package/_mjs/data/Exit/constructors.mjs.map +1 -0
- package/_mjs/data/Exit/definition.mjs +106 -0
- package/_mjs/data/Exit/definition.mjs.map +1 -0
- package/_mjs/data/Exit.mjs +5 -0
- package/_mjs/data/Exit.mjs.map +1 -0
- package/_mjs/data/FiberId/api.mjs +55 -0
- package/_mjs/data/FiberId/api.mjs.map +1 -0
- package/_mjs/data/FiberId/constructors.mjs +24 -0
- package/_mjs/data/FiberId/constructors.mjs.map +1 -0
- package/_mjs/data/FiberId/definition.mjs +101 -0
- package/_mjs/data/FiberId/definition.mjs.map +1 -0
- package/_mjs/data/FiberId.mjs +5 -0
- package/_mjs/data/FiberId.mjs.map +1 -0
- package/_mjs/data/Identity/api.mjs +29 -0
- package/_mjs/data/Identity/api.mjs.map +1 -0
- package/_mjs/data/Identity/definition.mjs +2 -0
- package/_mjs/data/Identity/definition.mjs.map +1 -0
- package/_mjs/data/Identity/instances.mjs +32 -0
- package/_mjs/data/Identity/instances.mjs.map +1 -0
- package/_mjs/data/Identity.mjs +5 -0
- package/_mjs/data/Identity.mjs.map +1 -0
- package/_mjs/data/Maybe/api.mjs +206 -0
- package/_mjs/data/Maybe/api.mjs.map +1 -0
- package/_mjs/data/Maybe/constructors.mjs +92 -0
- package/_mjs/data/Maybe/constructors.mjs.map +1 -0
- package/_mjs/data/Maybe/definition.mjs +99 -0
- package/_mjs/data/Maybe/definition.mjs.map +1 -0
- package/_mjs/data/Maybe/destructors.mjs +12 -0
- package/_mjs/data/Maybe/destructors.mjs.map +1 -0
- package/_mjs/data/Maybe/instances.mjs +42 -0
- package/_mjs/data/Maybe/instances.mjs.map +1 -0
- package/_mjs/data/Maybe.mjs +7 -0
- package/_mjs/data/Maybe.mjs.map +1 -0
- package/_mjs/data/Newtype.mjs +11 -0
- package/_mjs/data/Newtype.mjs.map +1 -0
- package/_mjs/data/Patch/api.mjs +111 -0
- package/_mjs/data/Patch/api.mjs.map +1 -0
- package/_mjs/data/Patch/definition.mjs +61 -0
- package/_mjs/data/Patch/definition.mjs.map +1 -0
- package/_mjs/data/Patch.mjs +4 -0
- package/_mjs/data/Patch.mjs.map +1 -0
- package/_mjs/data/Predicate/api.mjs +28 -0
- package/_mjs/data/Predicate/api.mjs.map +1 -0
- package/_mjs/data/Predicate/definition.mjs +2 -0
- package/_mjs/data/Predicate/definition.mjs.map +1 -0
- package/_mjs/data/Predicate.mjs +4 -0
- package/_mjs/data/Predicate.mjs.map +1 -0
- package/_mjs/data/Refinement/api.mjs +30 -0
- package/_mjs/data/Refinement/api.mjs.map +1 -0
- package/_mjs/data/Refinement/definition.mjs +2 -0
- package/_mjs/data/Refinement/definition.mjs.map +1 -0
- package/_mjs/data/Refinement.mjs +4 -0
- package/_mjs/data/Refinement.mjs.map +1 -0
- package/_mjs/data/Struct/api.mjs +26 -0
- package/_mjs/data/Struct/api.mjs.map +1 -0
- package/_mjs/data/Struct/definition.mjs +3 -0
- package/_mjs/data/Struct/definition.mjs.map +1 -0
- package/_mjs/data/Tag/constructors.mjs +9 -0
- package/_mjs/data/Tag/constructors.mjs.map +1 -0
- package/_mjs/data/Tag/definition.mjs +36 -0
- package/_mjs/data/Tag/definition.mjs.map +1 -0
- package/_mjs/data/Tag.mjs +4 -0
- package/_mjs/data/Tag.mjs.map +1 -0
- package/_mjs/data/These/constructors.mjs +26 -0
- package/_mjs/data/These/constructors.mjs.map +1 -0
- package/_mjs/data/These/definition.mjs +46 -0
- package/_mjs/data/These/definition.mjs.map +1 -0
- package/_mjs/data/These/destructors.mjs +22 -0
- package/_mjs/data/These/destructors.mjs.map +1 -0
- package/_mjs/data/These.mjs +5 -0
- package/_mjs/data/These.mjs.map +1 -0
- package/_mjs/data/Trace/api.mjs +19 -0
- package/_mjs/data/Trace/api.mjs.map +1 -0
- package/_mjs/data/Trace/constructors.mjs +16 -0
- package/_mjs/data/Trace/constructors.mjs.map +1 -0
- package/_mjs/data/Trace/definition.mjs +12 -0
- package/_mjs/data/Trace/definition.mjs.map +1 -0
- package/_mjs/data/Trace.mjs +5 -0
- package/_mjs/data/Trace.mjs.map +1 -0
- package/_mjs/data/TraceElement/definition.mjs +62 -0
- package/_mjs/data/TraceElement/definition.mjs.map +1 -0
- package/_mjs/data/TraceElement.mjs +3 -0
- package/_mjs/data/TraceElement.mjs.map +1 -0
- package/_mjs/data/exceptions/ArrayIndexOutOfBoundsError.mjs +10 -0
- package/_mjs/data/exceptions/ArrayIndexOutOfBoundsError.mjs.map +1 -0
- package/_mjs/data/exceptions/IllegalArgumentError.mjs +11 -0
- package/_mjs/data/exceptions/IllegalArgumentError.mjs.map +1 -0
- package/_mjs/data/exceptions/IllegalStateError.mjs +10 -0
- package/_mjs/data/exceptions/IllegalStateError.mjs.map +1 -0
- package/_mjs/data/exceptions/IndexOutOfBoundsError.mjs +10 -0
- package/_mjs/data/exceptions/IndexOutOfBoundsError.mjs.map +1 -0
- package/_mjs/data/exceptions/InterruptedException.mjs +13 -0
- package/_mjs/data/exceptions/InterruptedException.mjs.map +1 -0
- package/_mjs/data/exceptions/InvalidCapacityError.mjs +12 -0
- package/_mjs/data/exceptions/InvalidCapacityError.mjs.map +1 -0
- package/_mjs/data/exceptions/NoSuchElementError.mjs +10 -0
- package/_mjs/data/exceptions/NoSuchElementError.mjs.map +1 -0
- package/_mjs/data/exceptions.mjs +9 -0
- package/_mjs/data/exceptions.mjs.map +1 -0
- package/_mjs/data/function/api.mjs +37 -0
- package/_mjs/data/function/api.mjs.map +1 -0
- package/_mjs/data/function/definition.mjs +2 -0
- package/_mjs/data/function/definition.mjs.map +1 -0
- package/_mjs/data/function/pipe.mjs +67 -0
- package/_mjs/data/function/pipe.mjs.map +1 -0
- package/_mjs/data/function.mjs +5 -0
- package/_mjs/data/function.mjs.map +1 -0
- package/_mjs/data/number/api.mjs +7 -0
- package/_mjs/data/number/api.mjs.map +1 -0
- package/_mjs/data/number/definition.mjs +2 -0
- package/_mjs/data/number/definition.mjs.map +1 -0
- package/_mjs/data/number/instances.mjs +20 -0
- package/_mjs/data/number/instances.mjs.map +1 -0
- package/_mjs/data/number.mjs +5 -0
- package/_mjs/data/number.mjs.map +1 -0
- package/_mjs/data/object/definition.mjs +2 -0
- package/_mjs/data/object/definition.mjs.map +1 -0
- package/_mjs/data/object.mjs +3 -0
- package/_mjs/data/object.mjs.map +1 -0
- package/_mjs/data/string/api.mjs +192 -0
- package/_mjs/data/string/api.mjs.map +1 -0
- package/_mjs/data/string/definition.mjs +2 -0
- package/_mjs/data/string/definition.mjs.map +1 -0
- package/_mjs/data/string/instances.mjs +36 -0
- package/_mjs/data/string/instances.mjs.map +1 -0
- package/_mjs/data/string.mjs +5 -0
- package/_mjs/data/string.mjs.map +1 -0
- package/_mjs/global/api.mjs +4 -0
- package/_mjs/global/api.mjs.map +1 -0
- package/_mjs/internal/AtomicBoolean.mjs +8 -0
- package/_mjs/internal/AtomicBoolean.mjs.map +1 -0
- package/_mjs/internal/AtomicNumber.mjs +26 -0
- package/_mjs/internal/AtomicNumber.mjs.map +1 -0
- package/_mjs/internal/AtomicReference.mjs +31 -0
- package/_mjs/internal/AtomicReference.mjs.map +1 -0
- package/_mjs/internal/Stack.mjs +56 -0
- package/_mjs/internal/Stack.mjs.map +1 -0
- package/_mjs/optics/At/api.mjs +12 -0
- package/_mjs/optics/At/api.mjs.map +1 -0
- package/_mjs/optics/At/definition.mjs +19 -0
- package/_mjs/optics/At/definition.mjs.map +1 -0
- package/_mjs/optics/At.mjs +4 -0
- package/_mjs/optics/At.mjs.map +1 -0
- package/_mjs/optics/Fold/definition.mjs +12 -0
- package/_mjs/optics/Fold/definition.mjs.map +1 -0
- package/_mjs/optics/Fold.mjs +3 -0
- package/_mjs/optics/Fold.mjs.map +1 -0
- package/_mjs/optics/Getter/definition.mjs +13 -0
- package/_mjs/optics/Getter/definition.mjs.map +1 -0
- package/_mjs/optics/Getter.mjs +3 -0
- package/_mjs/optics/Getter.mjs.map +1 -0
- package/_mjs/optics/Index/api.mjs +22 -0
- package/_mjs/optics/Index/api.mjs.map +1 -0
- package/_mjs/optics/Index/definition.mjs +11 -0
- package/_mjs/optics/Index/definition.mjs.map +1 -0
- package/_mjs/optics/Index.mjs +4 -0
- package/_mjs/optics/Index.mjs.map +1 -0
- package/_mjs/optics/Iso/api.mjs +13 -0
- package/_mjs/optics/Iso/api.mjs.map +1 -0
- package/_mjs/optics/Iso/definition.mjs +34 -0
- package/_mjs/optics/Iso/definition.mjs.map +1 -0
- package/_mjs/optics/Iso.mjs +4 -0
- package/_mjs/optics/Iso.mjs.map +1 -0
- package/_mjs/optics/Lens/api.mjs +140 -0
- package/_mjs/optics/Lens/api.mjs.map +1 -0
- package/_mjs/optics/Lens/definition.mjs +29 -0
- package/_mjs/optics/Lens/definition.mjs.map +1 -0
- package/_mjs/optics/Lens.mjs +4 -0
- package/_mjs/optics/Lens.mjs.map +1 -0
- package/_mjs/optics/Optional/api/compose.mjs +14 -0
- package/_mjs/optics/Optional/api/compose.mjs.map +1 -0
- package/_mjs/optics/Optional/definition.mjs +35 -0
- package/_mjs/optics/Optional/definition.mjs.map +1 -0
- package/_mjs/optics/Optional.mjs +6 -0
- package/_mjs/optics/Optional.mjs.map +1 -0
- package/_mjs/optics/Prism/api/compose.mjs +15 -0
- package/_mjs/optics/Prism/api/compose.mjs.map +1 -0
- package/_mjs/optics/Prism/api/fromNullable.mjs +14 -0
- package/_mjs/optics/Prism/api/fromNullable.mjs.map +1 -0
- package/_mjs/optics/Prism/api/just.mjs +15 -0
- package/_mjs/optics/Prism/api/just.mjs.map +1 -0
- package/_mjs/optics/Prism/definition.mjs +28 -0
- package/_mjs/optics/Prism/definition.mjs.map +1 -0
- package/_mjs/optics/Prism.mjs +8 -0
- package/_mjs/optics/Prism.mjs.map +1 -0
- package/_mjs/optics/Setter/definition.mjs +23 -0
- package/_mjs/optics/Setter/definition.mjs.map +1 -0
- package/_mjs/optics/Setter.mjs +3 -0
- package/_mjs/optics/Setter.mjs.map +1 -0
- package/_mjs/optics/Traversal/api/compose.mjs +11 -0
- package/_mjs/optics/Traversal/api/compose.mjs.map +1 -0
- package/_mjs/optics/Traversal/api/fromTraversable.mjs +10 -0
- package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -0
- package/_mjs/optics/Traversal/definition.mjs +33 -0
- package/_mjs/optics/Traversal/definition.mjs.map +1 -0
- package/_mjs/optics/Traversal.mjs +7 -0
- package/_mjs/optics/Traversal.mjs.map +1 -0
- package/_mjs/typeclass/Align.mjs +13 -0
- package/_mjs/typeclass/Align.mjs.map +1 -0
- package/_mjs/typeclass/Alt.mjs +10 -0
- package/_mjs/typeclass/Alt.mjs.map +1 -0
- package/_mjs/typeclass/Alternative.mjs +15 -0
- package/_mjs/typeclass/Alternative.mjs.map +1 -0
- package/_mjs/typeclass/Applicative.mjs +14 -0
- package/_mjs/typeclass/Applicative.mjs.map +1 -0
- package/_mjs/typeclass/ApplicativeExcept.mjs +33 -0
- package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -0
- package/_mjs/typeclass/Apply.mjs +114 -0
- package/_mjs/typeclass/Apply.mjs.map +1 -0
- package/_mjs/typeclass/Chain.mjs +18 -0
- package/_mjs/typeclass/Chain.mjs.map +1 -0
- package/_mjs/typeclass/Closure.mjs +12 -0
- package/_mjs/typeclass/Closure.mjs.map +1 -0
- package/_mjs/typeclass/Eq.mjs +12 -0
- package/_mjs/typeclass/Eq.mjs.map +1 -0
- package/_mjs/typeclass/Equatable/api.mjs +31 -0
- package/_mjs/typeclass/Equatable/api.mjs.map +1 -0
- package/_mjs/typeclass/Equatable/definition.mjs +12 -0
- package/_mjs/typeclass/Equatable/definition.mjs.map +1 -0
- package/_mjs/typeclass/Equatable/fast-equals.mjs +476 -0
- package/_mjs/typeclass/Equatable/fast-equals.mjs.map +1 -0
- package/_mjs/typeclass/Equatable.mjs +5 -0
- package/_mjs/typeclass/Equatable.mjs.map +1 -0
- package/_mjs/typeclass/Fail.mjs +11 -0
- package/_mjs/typeclass/Fail.mjs.map +1 -0
- package/_mjs/typeclass/Filterable.mjs +16 -0
- package/_mjs/typeclass/Filterable.mjs.map +1 -0
- package/_mjs/typeclass/FilterableWithIndex.mjs +18 -0
- package/_mjs/typeclass/FilterableWithIndex.mjs.map +1 -0
- package/_mjs/typeclass/Foldable.mjs +19 -0
- package/_mjs/typeclass/Foldable.mjs.map +1 -0
- package/_mjs/typeclass/FoldableWithIndex.mjs +20 -0
- package/_mjs/typeclass/FoldableWithIndex.mjs.map +1 -0
- package/_mjs/typeclass/Functor.mjs +15 -0
- package/_mjs/typeclass/Functor.mjs.map +1 -0
- package/_mjs/typeclass/FunctorWithIndex.mjs +14 -0
- package/_mjs/typeclass/FunctorWithIndex.mjs.map +1 -0
- package/_mjs/typeclass/Has.mjs +10 -0
- package/_mjs/typeclass/Has.mjs.map +1 -0
- package/_mjs/typeclass/Hash.mjs +9 -0
- package/_mjs/typeclass/Hash.mjs.map +1 -0
- package/_mjs/typeclass/HashEq.mjs +32 -0
- package/_mjs/typeclass/HashEq.mjs.map +1 -0
- package/_mjs/typeclass/Hashable/definition.mjs +12 -0
- package/_mjs/typeclass/Hashable/definition.mjs.map +1 -0
- package/_mjs/typeclass/Hashable/hash.mjs +242 -0
- package/_mjs/typeclass/Hashable/hash.mjs.map +1 -0
- package/_mjs/typeclass/Hashable.mjs +4 -0
- package/_mjs/typeclass/Hashable.mjs.map +1 -0
- package/_mjs/typeclass/Monad.mjs +14 -0
- package/_mjs/typeclass/Monad.mjs.map +1 -0
- package/_mjs/typeclass/MonadExcept.mjs +17 -0
- package/_mjs/typeclass/MonadExcept.mjs.map +1 -0
- package/_mjs/typeclass/Monoid.mjs +12 -0
- package/_mjs/typeclass/Monoid.mjs.map +1 -0
- package/_mjs/typeclass/Nil.mjs +2 -0
- package/_mjs/typeclass/Nil.mjs.map +1 -0
- package/_mjs/typeclass/Ord/api/contramap.mjs +12 -0
- package/_mjs/typeclass/Ord/api/contramap.mjs.map +1 -0
- package/_mjs/typeclass/Ord/api/max.mjs +8 -0
- package/_mjs/typeclass/Ord/api/max.mjs.map +1 -0
- package/_mjs/typeclass/Ord/api/min.mjs +8 -0
- package/_mjs/typeclass/Ord/api/min.mjs.map +1 -0
- package/_mjs/typeclass/Ord/api.mjs +5 -0
- package/_mjs/typeclass/Ord/api.mjs.map +1 -0
- package/_mjs/typeclass/Ord/definition.mjs +13 -0
- package/_mjs/typeclass/Ord/definition.mjs.map +1 -0
- package/_mjs/typeclass/Ord/instances.mjs +34 -0
- package/_mjs/typeclass/Ord/instances.mjs.map +1 -0
- package/_mjs/typeclass/Ord.mjs +5 -0
- package/_mjs/typeclass/Ord.mjs.map +1 -0
- package/_mjs/typeclass/Ordering.mjs +42 -0
- package/_mjs/typeclass/Ordering.mjs.map +1 -0
- package/_mjs/typeclass/Pointed.mjs +10 -0
- package/_mjs/typeclass/Pointed.mjs.map +1 -0
- package/_mjs/typeclass/Semialign.mjs +84 -0
- package/_mjs/typeclass/Semialign.mjs.map +1 -0
- package/_mjs/typeclass/Semigroup/api.mjs +22 -0
- package/_mjs/typeclass/Semigroup/api.mjs.map +1 -0
- package/_mjs/typeclass/Semigroup/definition.mjs +8 -0
- package/_mjs/typeclass/Semigroup/definition.mjs.map +1 -0
- package/_mjs/typeclass/Semigroup.mjs +4 -0
- package/_mjs/typeclass/Semigroup.mjs.map +1 -0
- package/_mjs/typeclass/Semimonoidal.mjs +9 -0
- package/_mjs/typeclass/Semimonoidal.mjs.map +1 -0
- package/_mjs/typeclass/Showable/definition.mjs +13 -0
- package/_mjs/typeclass/Showable/definition.mjs.map +1 -0
- package/_mjs/typeclass/Showable/show.mjs +796 -0
- package/_mjs/typeclass/Showable/show.mjs.map +1 -0
- package/_mjs/typeclass/Showable/styles.mjs +22 -0
- package/_mjs/typeclass/Showable/styles.mjs.map +1 -0
- package/_mjs/typeclass/Showable/util.mjs +368 -0
- package/_mjs/typeclass/Showable/util.mjs.map +1 -0
- package/_mjs/typeclass/Showable.mjs +3 -0
- package/_mjs/typeclass/Showable.mjs.map +1 -0
- package/_mjs/typeclass/Traversable.mjs +32 -0
- package/_mjs/typeclass/Traversable.mjs.map +1 -0
- package/_mjs/typeclass/TraversableWithIndex.mjs +27 -0
- package/_mjs/typeclass/TraversableWithIndex.mjs.map +1 -0
- package/_mjs/typeclass/Witherable.mjs +40 -0
- package/_mjs/typeclass/Witherable.mjs.map +1 -0
- package/_mjs/typeclass/WitherableWithIndex.mjs +45 -0
- package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -0
- package/_mjs/typeclass/builtin/Symbol.mjs +2 -0
- package/_mjs/typeclass/builtin/Symbol.mjs.map +1 -0
- package/_mjs/typeclass/builtin.mjs +3 -0
- package/_mjs/typeclass/builtin.mjs.map +1 -0
- package/_mjs/typeclass.mjs +38 -0
- package/_mjs/typeclass.mjs.map +1 -0
- package/_mjs/types/extractions.mjs +2 -0
- package/_mjs/types/extractions.mjs.map +1 -0
- package/_mjs/types/test.mjs +2 -0
- package/_mjs/types/test.mjs.map +1 -0
- package/_mjs/types/utility.mjs +2 -0
- package/_mjs/types/utility.mjs.map +1 -0
- package/_mjs/types.mjs +5 -0
- package/_mjs/types.mjs.map +1 -0
- package/_mjs/util/AnsiFormat.mjs +244 -0
- package/_mjs/util/AnsiFormat.mjs.map +1 -0
- package/_mjs/util/PCGRandom.mjs +166 -0
- package/_mjs/util/PCGRandom.mjs.map +1 -0
- package/_mjs/util/assert.mjs +13 -0
- package/_mjs/util/assert.mjs.map +1 -0
- package/_mjs/util/pattern.mjs +9 -0
- package/_mjs/util/pattern.mjs.map +1 -0
- package/_mjs/util/predicates.mjs +93 -0
- package/_mjs/util/predicates.mjs.map +1 -0
- package/_mjs/util/rand/Random.mjs +92 -0
- package/_mjs/util/rand/Random.mjs.map +1 -0
- package/_mjs/util/rand/distribution/Distribution.mjs +2 -0
- package/_mjs/util/rand/distribution/Distribution.mjs.map +1 -0
- package/_mjs/util/rand/distribution/UniformArrayIntDistribution.mjs +26 -0
- package/_mjs/util/rand/distribution/UniformArrayIntDistribution.mjs.map +1 -0
- package/_mjs/util/rand/distribution/UniformBigIntDistribution.mjs +45 -0
- package/_mjs/util/rand/distribution/UniformBigIntDistribution.mjs.map +1 -0
- package/_mjs/util/rand/distribution/UniformIntDistribution.mjs +62 -0
- package/_mjs/util/rand/distribution/UniformIntDistribution.mjs.map +1 -0
- package/_mjs/util/rand/distribution/internals/ArrayInt.mjs +203 -0
- package/_mjs/util/rand/distribution/internals/ArrayInt.mjs.map +1 -0
- package/_mjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.mjs +37 -0
- package/_mjs/util/rand/distribution/internals/UniformArrayIntDistributionInternal.mjs.map +1 -0
- package/_mjs/util/rand/distribution/internals/UniformIntDistributionInternal.mjs +49 -0
- package/_mjs/util/rand/distribution/internals/UniformIntDistributionInternal.mjs.map +1 -0
- package/_mjs/util/rand/generator/MersenneTwister.mjs +106 -0
- package/_mjs/util/rand/generator/MersenneTwister.mjs.map +1 -0
- package/_mjs/util/rand/generator/RandomGenerator.mjs +17 -0
- package/_mjs/util/rand/generator/RandomGenerator.mjs.map +1 -0
- package/_mjs/util/rand.mjs +9 -0
- package/_mjs/util/rand.mjs.map +1 -0
- package/_src/collection/Iterable/api/traverseConc.ts +40 -0
- package/_src/collection/Iterable/api.ts +690 -0
- package/_src/collection/Iterable/constructors.ts +73 -0
- package/_src/collection/Iterable/definition.ts +15 -0
- package/_src/collection/Iterable.ts +5 -0
- package/_src/collection/compat/Array/api.ts +53 -0
- package/_src/collection/compat/Array/definition.ts +21 -0
- package/_src/collection/compat/Array.ts +4 -0
- package/_src/collection/compat/ArrayLike/api.ts +26 -0
- package/_src/collection/compat/ArrayLike/definition.ts +11 -0
- package/_src/collection/immutable/Conc/api/empty.ts +8 -0
- package/_src/collection/immutable/Conc/api/makeBy.ts +16 -0
- package/_src/collection/immutable/Conc/api/replicate.ts +6 -0
- package/_src/collection/immutable/Conc/api.ts +1146 -0
- package/_src/collection/immutable/Conc/constructors.ts +38 -0
- package/_src/collection/immutable/Conc/definition.ts +785 -0
- package/_src/collection/immutable/Conc.ts +11 -0
- package/_src/collection/immutable/Dictionary/api.ts +49 -0
- package/_src/collection/immutable/Dictionary/definition.ts +21 -0
- package/_src/collection/immutable/HashMap/api.ts +731 -0
- package/_src/collection/immutable/HashMap/definition.ts +128 -0
- package/_src/collection/immutable/HashMap/internal.ts +380 -0
- package/_src/collection/immutable/HashMap.ts +4 -0
- package/_src/collection/immutable/HashSet/api.ts +481 -0
- package/_src/collection/immutable/HashSet/definition.ts +402 -0
- package/_src/collection/immutable/HashSet.ts +4 -0
- package/_src/collection/immutable/ImmutableArray/api.ts +1519 -0
- package/_src/collection/immutable/ImmutableArray/constructors.ts +47 -0
- package/_src/collection/immutable/ImmutableArray/definition.ts +39 -0
- package/_src/collection/immutable/ImmutableArray/instances.ts +168 -0
- package/_src/collection/immutable/ImmutableArray.ts +6 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +513 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/constructors.ts +66 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +31 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/destructors.ts +41 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +115 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray.ts +7 -0
- package/_src/collection/immutable/List/api/foldLeft.ts +12 -0
- package/_src/collection/immutable/List/api/unsafeTail.ts +9 -0
- package/_src/collection/immutable/List/api.ts +354 -0
- package/_src/collection/immutable/List/constructors.ts +64 -0
- package/_src/collection/immutable/List/definition.ts +91 -0
- package/_src/collection/immutable/List.ts +10 -0
- package/_src/collection/immutable/Queue/api.ts +142 -0
- package/_src/collection/immutable/Queue/constructors.ts +16 -0
- package/_src/collection/immutable/Queue/definition.ts +34 -0
- package/_src/collection/immutable/Queue/guards.ts +8 -0
- package/_src/collection/immutable/Queue.ts +6 -0
- package/_src/collection/immutable/SortedMap/api.ts +540 -0
- package/_src/collection/immutable/SortedMap/definition.ts +17 -0
- package/_src/collection/immutable/SortedMap/internal.ts +358 -0
- package/_src/collection/immutable/SortedMap/iterator.ts +304 -0
- package/_src/collection/immutable/SortedMap/node.ts +21 -0
- package/_src/collection/immutable/SortedMap.ts +7 -0
- package/_src/collection/immutable/Vector/api.ts +1335 -0
- package/_src/collection/immutable/Vector/definition.ts +96 -0
- package/_src/collection/immutable/Vector/internal.ts +1438 -0
- package/_src/collection/immutable/Vector.ts +4 -0
- package/_src/collection/mutable/HashMap.ts +338 -0
- package/_src/collection/mutable/HashSet.ts +254 -0
- package/_src/collection/mutable/ListBuffer.ts +123 -0
- package/_src/collection/mutable/internal.ts +26 -0
- package/_src/control/Eval/api/sequenceArray.ts +6 -0
- package/_src/control/Eval/api.ts +93 -0
- package/_src/control/Eval/constructors.ts +30 -0
- package/_src/control/Eval/definition.ts +67 -0
- package/_src/control/Eval/instance.ts +31 -0
- package/_src/control/Eval/run.ts +41 -0
- package/_src/control/Eval.ts +7 -0
- package/_src/control/LazyValue.ts +24 -0
- package/_src/control/Z/api.ts +619 -0
- package/_src/control/Z/definition.ts +189 -0
- package/_src/control/Z/instances.ts +14 -0
- package/_src/control/Z/runtime.ts +291 -0
- package/_src/control/Z.ts +6 -0
- package/_src/data/Byte.ts +1 -0
- package/_src/data/CaseClass.ts +112 -0
- package/_src/data/Cause/api/fold.ts +104 -0
- package/_src/data/Cause/api/isEmpty.ts +46 -0
- package/_src/data/Cause/api/linearize.ts +16 -0
- package/_src/data/Cause/api/prettyPrint.ts +38 -0
- package/_src/data/Cause/api/unified.ts +67 -0
- package/_src/data/Cause/api.ts +984 -0
- package/_src/data/Cause/definition.ts +521 -0
- package/_src/data/Cause.ts +4 -0
- package/_src/data/Const/api.ts +16 -0
- package/_src/data/Const/definition.ts +11 -0
- package/_src/data/Const/instances.ts +34 -0
- package/_src/data/Const.ts +5 -0
- package/_src/data/Duration/api.ts +69 -0
- package/_src/data/Duration/definition.ts +25 -0
- package/_src/data/Duration.ts +4 -0
- package/_src/data/Either/api/align.ts +8 -0
- package/_src/data/Either/api/alignWith.ts +21 -0
- package/_src/data/Either/api.ts +200 -0
- package/_src/data/Either/constructors.ts +77 -0
- package/_src/data/Either/definition.ts +48 -0
- package/_src/data/Either/destructors.ts +13 -0
- package/_src/data/Either/instances.ts +80 -0
- package/_src/data/Either.ts +7 -0
- package/_src/data/Environment/api.ts +78 -0
- package/_src/data/Environment/definition.ts +32 -0
- package/_src/data/Environment.ts +4 -0
- package/_src/data/ExecutionStrategy.ts +81 -0
- package/_src/data/Exit/api.ts +172 -0
- package/_src/data/Exit/constructors.ts +55 -0
- package/_src/data/Exit/definition.ts +102 -0
- package/_src/data/Exit.ts +5 -0
- package/_src/data/FiberId/api.ts +45 -0
- package/_src/data/FiberId/constructors.ts +21 -0
- package/_src/data/FiberId/definition.ts +91 -0
- package/_src/data/FiberId.ts +5 -0
- package/_src/data/Identity/api.ts +28 -0
- package/_src/data/Identity/definition.ts +11 -0
- package/_src/data/Identity/instances.ts +21 -0
- package/_src/data/Identity.ts +5 -0
- package/_src/data/Maybe/api.ts +187 -0
- package/_src/data/Maybe/constructors.ts +84 -0
- package/_src/data/Maybe/definition.ts +91 -0
- package/_src/data/Maybe/destructors.ts +11 -0
- package/_src/data/Maybe/instances.ts +53 -0
- package/_src/data/Maybe.ts +7 -0
- package/_src/data/Newtype.ts +66 -0
- package/_src/data/Patch/api.ts +75 -0
- package/_src/data/Patch/definition.ts +58 -0
- package/_src/data/Patch.ts +4 -0
- package/_src/data/Predicate/api.ts +27 -0
- package/_src/data/Predicate/definition.ts +10 -0
- package/_src/data/Predicate.ts +4 -0
- package/_src/data/Refinement/api.ts +29 -0
- package/_src/data/Refinement/definition.ts +13 -0
- package/_src/data/Refinement.ts +4 -0
- package/_src/data/Struct/api.ts +22 -0
- package/_src/data/Struct/definition.ts +23 -0
- package/_src/data/Tag/constructors.ts +6 -0
- package/_src/data/Tag/definition.ts +31 -0
- package/_src/data/Tag.ts +4 -0
- package/_src/data/These/constructors.ts +25 -0
- package/_src/data/These/definition.ts +47 -0
- package/_src/data/These/destructors.ts +20 -0
- package/_src/data/These.ts +5 -0
- package/_src/data/Trace/api.ts +13 -0
- package/_src/data/Trace/constructors.ts +13 -0
- package/_src/data/Trace/definition.ts +9 -0
- package/_src/data/Trace.ts +5 -0
- package/_src/data/TraceElement/definition.ts +69 -0
- package/_src/data/TraceElement.ts +3 -0
- package/_src/data/exceptions/ArrayIndexOutOfBoundsError.ts +9 -0
- package/_src/data/exceptions/IllegalArgumentError.ts +9 -0
- package/_src/data/exceptions/IllegalStateError.ts +9 -0
- package/_src/data/exceptions/IndexOutOfBoundsError.ts +9 -0
- package/_src/data/exceptions/InterruptedException.ts +13 -0
- package/_src/data/exceptions/InvalidCapacityError.ts +12 -0
- package/_src/data/exceptions/NoSuchElementError.ts +9 -0
- package/_src/data/exceptions.ts +9 -0
- package/_src/data/function/api.ts +39 -0
- package/_src/data/function/definition.ts +31 -0
- package/_src/data/function/pipe.ts +301 -0
- package/_src/data/function.ts +5 -0
- package/_src/data/number/api.ts +6 -0
- package/_src/data/number/definition.ts +13 -0
- package/_src/data/number/instances.ts +15 -0
- package/_src/data/number.ts +5 -0
- package/_src/data/object/definition.ts +12 -0
- package/_src/data/object.ts +3 -0
- package/_src/data/string/api.ts +182 -0
- package/_src/data/string/definition.ts +13 -0
- package/_src/data/string/instances.ts +24 -0
- package/_src/data/string.ts +5 -0
- package/_src/global/api.ts +23 -0
- package/_src/internal/AtomicBoolean.ts +7 -0
- package/_src/internal/AtomicNumber.ts +28 -0
- package/_src/internal/AtomicReference.ts +28 -0
- package/_src/internal/Stack.ts +52 -0
- package/_src/optics/At/api.ts +10 -0
- package/_src/optics/At/definition.ts +32 -0
- package/_src/optics/At.ts +4 -0
- package/_src/optics/Fold/definition.ts +38 -0
- package/_src/optics/Fold.ts +3 -0
- package/_src/optics/Getter/definition.ts +34 -0
- package/_src/optics/Getter.ts +3 -0
- package/_src/optics/Index/api.ts +19 -0
- package/_src/optics/Index/definition.ts +24 -0
- package/_src/optics/Index.ts +4 -0
- package/_src/optics/Iso/api.ts +11 -0
- package/_src/optics/Iso/definition.ts +52 -0
- package/_src/optics/Iso.ts +4 -0
- package/_src/optics/Lens/api.ts +132 -0
- package/_src/optics/Lens/definition.ts +51 -0
- package/_src/optics/Lens.ts +4 -0
- package/_src/optics/Optional/api/compose.ts +15 -0
- package/_src/optics/Optional/definition.ts +90 -0
- package/_src/optics/Optional.ts +7 -0
- package/_src/optics/Prism/api/compose.ts +12 -0
- package/_src/optics/Prism/api/fromNullable.ts +12 -0
- package/_src/optics/Prism/api/just.ts +11 -0
- package/_src/optics/Prism/definition.ts +59 -0
- package/_src/optics/Prism.ts +9 -0
- package/_src/optics/Setter/definition.ts +66 -0
- package/_src/optics/Setter.ts +3 -0
- package/_src/optics/Traversal/api/compose.ts +13 -0
- package/_src/optics/Traversal/api/fromTraversable.ts +50 -0
- package/_src/optics/Traversal/definition.ts +73 -0
- package/_src/optics/Traversal.ts +8 -0
- package/_src/typeclass/Align.ts +28 -0
- package/_src/typeclass/Alt.ts +105 -0
- package/_src/typeclass/Alternative.ts +31 -0
- package/_src/typeclass/Applicative.ts +31 -0
- package/_src/typeclass/ApplicativeExcept.ts +226 -0
- package/_src/typeclass/Apply.ts +634 -0
- package/_src/typeclass/Chain.ts +226 -0
- package/_src/typeclass/Closure.ts +36 -0
- package/_src/typeclass/Eq.ts +36 -0
- package/_src/typeclass/Equatable/api.ts +34 -0
- package/_src/typeclass/Equatable/definition.ts +22 -0
- package/_src/typeclass/Equatable/fast-equals.ts +498 -0
- package/_src/typeclass/Equatable.ts +5 -0
- package/_src/typeclass/Fail.ts +40 -0
- package/_src/typeclass/Filterable.ts +139 -0
- package/_src/typeclass/FilterableWithIndex.ts +143 -0
- package/_src/typeclass/Foldable.ts +73 -0
- package/_src/typeclass/FoldableWithIndex.ts +96 -0
- package/_src/typeclass/Functor.ts +76 -0
- package/_src/typeclass/FunctorWithIndex.ts +43 -0
- package/_src/typeclass/Has.ts +19 -0
- package/_src/typeclass/Hash.ts +17 -0
- package/_src/typeclass/HashEq.ts +44 -0
- package/_src/typeclass/Hashable/definition.ts +22 -0
- package/_src/typeclass/Hashable/hash.ts +208 -0
- package/_src/typeclass/Hashable.ts +4 -0
- package/_src/typeclass/Monad.ts +26 -0
- package/_src/typeclass/MonadExcept.ts +47 -0
- package/_src/typeclass/Monoid.ts +31 -0
- package/_src/typeclass/Nil.ts +23 -0
- package/_src/typeclass/Ord/api/contramap.ts +13 -0
- package/_src/typeclass/Ord/api/max.ts +9 -0
- package/_src/typeclass/Ord/api/min.ts +9 -0
- package/_src/typeclass/Ord/api.ts +5 -0
- package/_src/typeclass/Ord/definition.ts +43 -0
- package/_src/typeclass/Ord/instances.ts +30 -0
- package/_src/typeclass/Ord.ts +5 -0
- package/_src/typeclass/Ordering.ts +42 -0
- package/_src/typeclass/Pointed.ts +37 -0
- package/_src/typeclass/Semialign.ts +551 -0
- package/_src/typeclass/Semigroup/api.ts +21 -0
- package/_src/typeclass/Semigroup/definition.ts +24 -0
- package/_src/typeclass/Semigroup.ts +4 -0
- package/_src/typeclass/Semimonoidal.ts +97 -0
- package/_src/typeclass/Showable/definition.ts +23 -0
- package/_src/typeclass/Showable/show.ts +914 -0
- package/_src/typeclass/Showable/styles.ts +57 -0
- package/_src/typeclass/Showable/util.ts +385 -0
- package/_src/typeclass/Showable.ts +2 -0
- package/_src/typeclass/Traversable.ts +177 -0
- package/_src/typeclass/TraversableWithIndex.ts +142 -0
- package/_src/typeclass/Witherable.ts +303 -0
- package/_src/typeclass/WitherableWithIndex.ts +359 -0
- package/_src/typeclass/builtin/Symbol.ts +8 -0
- package/_src/typeclass/builtin.ts +3 -0
- package/_src/typeclass.ts +38 -0
- package/_src/types/extractions.ts +11 -0
- package/_src/types/test.ts +0 -0
- package/_src/types/utility.ts +9 -0
- package/_src/types.ts +5 -0
- package/_src/util/AnsiFormat.ts +259 -0
- package/_src/util/PCGRandom.ts +191 -0
- package/_src/util/assert.ts +11 -0
- package/_src/util/pattern.ts +35 -0
- package/_src/util/predicates.ts +144 -0
- package/_src/util/rand/Random.ts +100 -0
- package/_src/util/rand/distribution/Distribution.ts +10 -0
- package/_src/util/rand/distribution/UniformArrayIntDistribution.ts +49 -0
- package/_src/util/rand/distribution/UniformBigIntDistribution.ts +62 -0
- package/_src/util/rand/distribution/UniformIntDistribution.ts +75 -0
- package/_src/util/rand/distribution/internals/ArrayInt.ts +200 -0
- package/_src/util/rand/distribution/internals/UniformArrayIntDistributionInternal.ts +43 -0
- package/_src/util/rand/distribution/internals/UniformIntDistributionInternal.ts +47 -0
- package/_src/util/rand/generator/MersenneTwister.ts +160 -0
- package/_src/util/rand/generator/RandomGenerator.ts +22 -0
- package/_src/util/rand.ts +20 -0
- package/collection/Iterable/api/traverseConc.d.ts +13 -0
- package/collection/Iterable/api.d.ts +172 -0
- package/collection/Iterable/constructors.d.ts +25 -0
- package/collection/Iterable/definition.d.ts +14 -0
- package/collection/Iterable.d.ts +3 -0
- package/collection/compat/Array/api.d.ts +32 -0
- package/collection/compat/Array/definition.d.ts +20 -0
- package/collection/compat/Array.d.ts +2 -0
- package/collection/compat/ArrayLike/api.d.ts +5 -0
- package/collection/compat/ArrayLike/definition.d.ts +13 -0
- package/collection/immutable/Conc/api/empty.d.ts +6 -0
- package/collection/immutable/Conc/api/makeBy.d.ts +7 -0
- package/collection/immutable/Conc/api/replicate.d.ts +6 -0
- package/collection/immutable/Conc/api.d.ts +368 -0
- package/collection/immutable/Conc/constructors.d.ts +27 -0
- package/collection/immutable/Conc/definition.d.ts +213 -0
- package/collection/immutable/Conc.d.ts +6 -0
- package/collection/immutable/Dictionary/api.d.ts +27 -0
- package/collection/immutable/Dictionary/definition.d.ts +19 -0
- package/collection/immutable/HashMap/api.d.ts +336 -0
- package/collection/immutable/HashMap/definition.d.ts +44 -0
- package/collection/immutable/HashMap/internal.d.ts +67 -0
- package/collection/immutable/HashMap.d.ts +2 -0
- package/collection/immutable/HashSet/api.d.ts +170 -0
- package/collection/immutable/HashSet/definition.d.ts +97 -0
- package/collection/immutable/HashSet.d.ts +2 -0
- package/collection/immutable/ImmutableArray/api.d.ts +680 -0
- package/collection/immutable/ImmutableArray/constructors.d.ts +32 -0
- package/collection/immutable/ImmutableArray/definition.d.ts +25 -0
- package/collection/immutable/ImmutableArray/instances.d.ts +18 -0
- package/collection/immutable/ImmutableArray.d.ts +4 -0
- package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +205 -0
- package/collection/immutable/ImmutableNonEmptyArray/constructors.d.ts +45 -0
- package/collection/immutable/ImmutableNonEmptyArray/definition.d.ts +28 -0
- package/collection/immutable/ImmutableNonEmptyArray/destructors.d.ts +32 -0
- package/collection/immutable/ImmutableNonEmptyArray/instances.d.ts +52 -0
- package/collection/immutable/ImmutableNonEmptyArray.d.ts +5 -0
- package/collection/immutable/List/api/foldLeft.d.ts +6 -0
- package/collection/immutable/List/api/unsafeTail.d.ts +6 -0
- package/collection/immutable/List/api.d.ts +100 -0
- package/collection/immutable/List/constructors.d.ts +27 -0
- package/collection/immutable/List/definition.d.ts +40 -0
- package/collection/immutable/List.d.ts +5 -0
- package/collection/immutable/Queue/api.d.ts +78 -0
- package/collection/immutable/Queue/constructors.d.ts +11 -0
- package/collection/immutable/Queue/definition.d.ts +12 -0
- package/collection/immutable/Queue/guards.d.ts +6 -0
- package/collection/immutable/Queue.d.ts +4 -0
- package/collection/immutable/SortedMap/api.d.ts +134 -0
- package/collection/immutable/SortedMap/definition.d.ts +13 -0
- package/collection/immutable/SortedMap/internal.d.ts +8 -0
- package/collection/immutable/SortedMap/iterator.d.ts +64 -0
- package/collection/immutable/SortedMap/node.d.ts +16 -0
- package/collection/immutable/SortedMap.d.ts +5 -0
- package/collection/immutable/Vector/api.d.ts +596 -0
- package/collection/immutable/Vector/definition.d.ts +66 -0
- package/collection/immutable/Vector/internal.d.ts +199 -0
- package/collection/immutable/Vector.d.ts +2 -0
- package/collection/mutable/HashMap.d.ts +55 -0
- package/collection/mutable/HashSet.d.ts +48 -0
- package/collection/mutable/ListBuffer.d.ts +19 -0
- package/collection/mutable/internal.d.ts +4 -0
- package/control/Eval/api/sequenceArray.d.ts +6 -0
- package/control/Eval/api.d.ts +53 -0
- package/control/Eval/constructors.d.ts +19 -0
- package/control/Eval/definition.d.ts +59 -0
- package/control/Eval/instance.d.ts +17 -0
- package/control/Eval/run.d.ts +7 -0
- package/control/Eval.d.ts +5 -0
- package/control/LazyValue.d.ts +15 -0
- package/control/Z/api.d.ts +343 -0
- package/control/Z/definition.d.ts +135 -0
- package/control/Z/instances.d.ts +7 -0
- package/control/Z/runtime.d.ts +55 -0
- package/control/Z.d.ts +4 -0
- package/data/Byte.d.ts +1 -0
- package/data/CaseClass.d.ts +26 -0
- package/data/Cause/api/fold.d.ts +19 -0
- package/data/Cause/api/isEmpty.d.ts +7 -0
- package/data/Cause/api/linearize.d.ts +7 -0
- package/data/Cause/api/prettyPrint.d.ts +6 -0
- package/data/Cause/api/unified.d.ts +9 -0
- package/data/Cause/api.d.ts +283 -0
- package/data/Cause/definition.d.ts +130 -0
- package/data/Cause.d.ts +2 -0
- package/data/Const/api.d.ts +12 -0
- package/data/Const/definition.d.ts +12 -0
- package/data/Const/instances.d.ts +20 -0
- package/data/Const.d.ts +3 -0
- package/data/Duration/api.d.ts +52 -0
- package/data/Duration/definition.d.ts +16 -0
- package/data/Duration.d.ts +2 -0
- package/data/Either/api/align.d.ts +3 -0
- package/data/Either/api/alignWith.d.ts +7 -0
- package/data/Either/api.d.ts +128 -0
- package/data/Either/constructors.d.ts +50 -0
- package/data/Either/definition.d.ts +40 -0
- package/data/Either/destructors.d.ts +6 -0
- package/data/Either/instances.d.ts +21 -0
- package/data/Either.d.ts +5 -0
- package/data/Environment/api.d.ts +45 -0
- package/data/Environment/definition.d.ts +25 -0
- package/data/Environment.d.ts +2 -0
- package/data/ExecutionStrategy.d.ts +45 -0
- package/data/Exit/api.d.ts +99 -0
- package/data/Exit/constructors.d.ts +45 -0
- package/data/Exit/definition.d.ts +70 -0
- package/data/Exit.d.ts +3 -0
- package/data/FiberId/api.d.ts +17 -0
- package/data/FiberId/constructors.d.ts +17 -0
- package/data/FiberId/definition.d.ts +65 -0
- package/data/FiberId.d.ts +3 -0
- package/data/Identity/api.d.ts +22 -0
- package/data/Identity/definition.d.ts +10 -0
- package/data/Identity/instances.d.ts +21 -0
- package/data/Identity.d.ts +3 -0
- package/data/Maybe/api.d.ts +125 -0
- package/data/Maybe/constructors.d.ts +47 -0
- package/data/Maybe/definition.d.ts +59 -0
- package/data/Maybe/destructors.d.ts +8 -0
- package/data/Maybe/instances.d.ts +15 -0
- package/data/Maybe.d.ts +5 -0
- package/data/Newtype.d.ts +36 -0
- package/data/Patch/api.d.ts +24 -0
- package/data/Patch/definition.d.ts +44 -0
- package/data/Patch.d.ts +2 -0
- package/data/Predicate/api.d.ts +21 -0
- package/data/Predicate/definition.d.ts +9 -0
- package/data/Predicate.d.ts +2 -0
- package/data/Refinement/api.d.ts +23 -0
- package/data/Refinement/definition.d.ts +12 -0
- package/data/Refinement.d.ts +2 -0
- package/data/Struct/api.d.ts +12 -0
- package/data/Struct/definition.d.ts +19 -0
- package/data/Tag/constructors.d.ts +6 -0
- package/data/Tag/definition.d.ts +19 -0
- package/data/Tag.d.ts +2 -0
- package/data/These/constructors.d.ts +19 -0
- package/data/These/definition.d.ts +45 -0
- package/data/These/destructors.d.ts +6 -0
- package/data/These.d.ts +3 -0
- package/data/Trace/api.d.ts +12 -0
- package/data/Trace/constructors.d.ts +14 -0
- package/data/Trace/definition.d.ts +12 -0
- package/data/Trace.d.ts +3 -0
- package/data/TraceElement/definition.d.ts +39 -0
- package/data/TraceElement.d.ts +1 -0
- package/data/exceptions/ArrayIndexOutOfBoundsError.d.ts +5 -0
- package/data/exceptions/IllegalArgumentError.d.ts +6 -0
- package/data/exceptions/IllegalStateError.d.ts +5 -0
- package/data/exceptions/IndexOutOfBoundsError.d.ts +5 -0
- package/data/exceptions/InterruptedException.d.ts +8 -0
- package/data/exceptions/InvalidCapacityError.d.ts +5 -0
- package/data/exceptions/NoSuchElementError.d.ts +5 -0
- package/data/exceptions.d.ts +7 -0
- package/data/function/api.d.ts +27 -0
- package/data/function/definition.d.ts +30 -0
- package/data/function/pipe.d.ts +25 -0
- package/data/function.d.ts +3 -0
- package/data/number/api.d.ts +5 -0
- package/data/number/definition.d.ts +13 -0
- package/data/number/instances.d.ts +11 -0
- package/data/number.d.ts +3 -0
- package/data/object/definition.d.ts +13 -0
- package/data/object.d.ts +1 -0
- package/data/string/api.d.ts +145 -0
- package/data/string/definition.d.ts +13 -0
- package/data/string/instances.d.ts +21 -0
- package/data/string.d.ts +3 -0
- package/global/api.d.ts +8 -0
- package/internal/AtomicBoolean.d.ts +4 -0
- package/internal/AtomicNumber.d.ts +7 -0
- package/internal/AtomicReference.d.ts +9 -0
- package/internal/Stack.d.ts +28 -0
- package/optics/At/api.d.ts +7 -0
- package/optics/At/definition.d.ts +22 -0
- package/optics/At.d.ts +2 -0
- package/optics/Fold/definition.d.ts +28 -0
- package/optics/Fold.d.ts +1 -0
- package/optics/Getter/definition.d.ts +24 -0
- package/optics/Getter.d.ts +1 -0
- package/optics/Index/api.d.ts +14 -0
- package/optics/Index/definition.d.ts +19 -0
- package/optics/Index.d.ts +2 -0
- package/optics/Iso/api.d.ts +6 -0
- package/optics/Iso/definition.d.ts +40 -0
- package/optics/Iso.d.ts +2 -0
- package/optics/Lens/api.d.ts +49 -0
- package/optics/Lens/definition.d.ts +40 -0
- package/optics/Lens.d.ts +2 -0
- package/optics/Optional/api/compose.d.ts +6 -0
- package/optics/Optional/definition.d.ts +62 -0
- package/optics/Optional.d.ts +2 -0
- package/optics/Prism/api/compose.d.ts +6 -0
- package/optics/Prism/api/fromNullable.d.ts +6 -0
- package/optics/Prism/api/just.d.ts +7 -0
- package/optics/Prism/definition.d.ts +42 -0
- package/optics/Prism.d.ts +4 -0
- package/optics/Setter/definition.d.ts +51 -0
- package/optics/Setter.d.ts +1 -0
- package/optics/Traversal/api/compose.d.ts +6 -0
- package/optics/Traversal/api/fromTraversable.d.ts +8 -0
- package/optics/Traversal/definition.d.ts +46 -0
- package/optics/Traversal.d.ts +3 -0
- package/package.json +16 -0
- package/typeclass/Align.d.ts +21 -0
- package/typeclass/Alt.d.ts +30 -0
- package/typeclass/Alternative.d.ts +23 -0
- package/typeclass/Applicative.d.ts +20 -0
- package/typeclass/ApplicativeExcept.d.ts +60 -0
- package/typeclass/Apply.d.ts +103 -0
- package/typeclass/Chain.d.ts +39 -0
- package/typeclass/Closure.d.ts +27 -0
- package/typeclass/Eq.d.ts +27 -0
- package/typeclass/Equatable/api.d.ts +11 -0
- package/typeclass/Equatable/definition.d.ts +18 -0
- package/typeclass/Equatable/fast-equals.d.ts +202 -0
- package/typeclass/Equatable.d.ts +3 -0
- package/typeclass/Fail.d.ts +23 -0
- package/typeclass/Filterable.d.ts +68 -0
- package/typeclass/FilterableWithIndex.d.ts +67 -0
- package/typeclass/Foldable.d.ts +47 -0
- package/typeclass/FoldableWithIndex.d.ts +49 -0
- package/typeclass/Functor.d.ts +37 -0
- package/typeclass/FunctorWithIndex.d.ts +27 -0
- package/typeclass/Has.d.ts +16 -0
- package/typeclass/Hash.d.ts +14 -0
- package/typeclass/HashEq.d.ts +30 -0
- package/typeclass/Hashable/definition.d.ts +18 -0
- package/typeclass/Hashable/hash.d.ts +55 -0
- package/typeclass/Hashable.d.ts +2 -0
- package/typeclass/Monad.d.ts +19 -0
- package/typeclass/MonadExcept.d.ts +32 -0
- package/typeclass/Monoid.d.ts +22 -0
- package/typeclass/Nil.d.ts +13 -0
- package/typeclass/Ord/api/contramap.d.ts +6 -0
- package/typeclass/Ord/api/max.d.ts +7 -0
- package/typeclass/Ord/api/min.d.ts +7 -0
- package/typeclass/Ord/api.d.ts +3 -0
- package/typeclass/Ord/definition.d.ts +31 -0
- package/typeclass/Ord/instances.d.ts +13 -0
- package/typeclass/Ord.d.ts +3 -0
- package/typeclass/Ordering.d.ts +32 -0
- package/typeclass/Pointed.d.ts +21 -0
- package/typeclass/Semialign.d.ts +84 -0
- package/typeclass/Semigroup/api.d.ts +12 -0
- package/typeclass/Semigroup/definition.d.ts +20 -0
- package/typeclass/Semigroup.d.ts +2 -0
- package/typeclass/Semimonoidal.d.ts +25 -0
- package/typeclass/Showable/definition.d.ts +17 -0
- package/typeclass/Showable/show.d.ts +54 -0
- package/typeclass/Showable/styles.d.ts +8 -0
- package/typeclass/Showable/util.d.ts +38 -0
- package/typeclass/Showable.d.ts +2 -0
- package/typeclass/Traversable.d.ts +71 -0
- package/typeclass/TraversableWithIndex.d.ts +64 -0
- package/typeclass/Witherable.d.ts +98 -0
- package/typeclass/WitherableWithIndex.d.ts +114 -0
- package/typeclass/builtin/Symbol.d.ts +8 -0
- package/typeclass/builtin.d.ts +1 -0
- package/typeclass.d.ts +36 -0
- package/types/extractions.d.ts +12 -0
- package/types/test.d.ts +1 -0
- package/types/utility.d.ts +8 -0
- package/types.d.ts +3 -0
- package/util/AnsiFormat.d.ts +107 -0
- package/util/PCGRandom.d.ts +50 -0
- package/util/assert.d.ts +5 -0
- package/util/pattern.d.ts +68 -0
- package/util/predicates.d.ts +36 -0
- package/util/rand/Random.d.ts +69 -0
- package/util/rand/distribution/Distribution.d.ts +9 -0
- package/util/rand/distribution/UniformArrayIntDistribution.d.ts +23 -0
- package/util/rand/distribution/UniformBigIntDistribution.d.ts +22 -0
- package/util/rand/distribution/UniformIntDistribution.d.ts +22 -0
- package/util/rand/distribution/internals/ArrayInt.d.ts +57 -0
- package/util/rand/distribution/internals/UniformArrayIntDistributionInternal.d.ts +12 -0
- package/util/rand/distribution/internals/UniformIntDistributionInternal.d.ts +6 -0
- package/util/rand/generator/MersenneTwister.d.ts +11 -0
- package/util/rand/generator/RandomGenerator.d.ts +10 -0
- package/util/rand.d.ts +9 -0
@@ -0,0 +1,1519 @@
|
|
1
|
+
import type { ImmutableArrayF } from "@fncts/base/collection/immutable/ImmutableArray/definition";
|
2
|
+
import type { Monoid } from "@fncts/base/typeclass";
|
3
|
+
|
4
|
+
import { EitherTag } from "@fncts/base/data/Either";
|
5
|
+
import { identity, tuple } from "@fncts/base/data/function";
|
6
|
+
import * as P from "@fncts/base/typeclass";
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @tsplus fluent fncts.ImmutableArray alignWith
|
10
|
+
*/
|
11
|
+
export function alignWith_<A, B, C>(
|
12
|
+
self: ImmutableArray<A>,
|
13
|
+
fb: ImmutableArray<B>,
|
14
|
+
f: (_: These<A, B>) => C,
|
15
|
+
): ImmutableArray<C> {
|
16
|
+
const selfArray = self._array;
|
17
|
+
const thatArray = fb._array;
|
18
|
+
const minlen = Math.min(selfArray.length, thatArray.length);
|
19
|
+
const maxlen = Math.max(selfArray.length, thatArray.length);
|
20
|
+
const ret = Array<C>(maxlen);
|
21
|
+
for (let i = 0; i < minlen; i++) {
|
22
|
+
ret[i] = f(These.both(selfArray[i]!, thatArray[i]!));
|
23
|
+
}
|
24
|
+
if (minlen === maxlen) {
|
25
|
+
return ret.asImmutableArray;
|
26
|
+
} else if (selfArray.length > thatArray.length) {
|
27
|
+
for (let i = minlen; i < maxlen; i++) {
|
28
|
+
ret[i] = f(These.left(selfArray[i]!));
|
29
|
+
}
|
30
|
+
} else {
|
31
|
+
for (let i = minlen; i < maxlen; i++) {
|
32
|
+
ret[i] = f(These.right(thatArray[i]!));
|
33
|
+
}
|
34
|
+
}
|
35
|
+
return ret.asImmutableArray;
|
36
|
+
}
|
37
|
+
|
38
|
+
/**
|
39
|
+
* @tsplus fluent fncts.ImmutableArray align
|
40
|
+
*/
|
41
|
+
export function align_<A, B>(self: ImmutableArray<A>, fb: ImmutableArray<B>): ImmutableArray<These<A, B>> {
|
42
|
+
return self.alignWith(fb, identity);
|
43
|
+
}
|
44
|
+
|
45
|
+
/**
|
46
|
+
* @tsplus fluent fncts.ImmutableArray alt
|
47
|
+
*/
|
48
|
+
export function alt_<A, B>(self: ImmutableArray<A>, that: Lazy<ImmutableArray<B>>): ImmutableArray<A | B> {
|
49
|
+
return self.concat(that());
|
50
|
+
}
|
51
|
+
|
52
|
+
/**
|
53
|
+
* @tsplus fluent fncts.ImmutableArray ap
|
54
|
+
*/
|
55
|
+
export function ap_<A, B>(self: ImmutableArray<(a: A) => B>, fa: ImmutableArray<A>): ImmutableArray<B> {
|
56
|
+
return self.flatMap((f) => fa.map(f));
|
57
|
+
}
|
58
|
+
|
59
|
+
/**
|
60
|
+
* @tsplus fluent fncts.ImmutableArray append
|
61
|
+
*/
|
62
|
+
export function append_<A, B>(self: ImmutableArray<A>, last: B): ImmutableArray<A | B> {
|
63
|
+
const selfArray = self._array;
|
64
|
+
const len = selfArray.length;
|
65
|
+
const r = Array<A | B>(len + 1);
|
66
|
+
r[len] = last;
|
67
|
+
for (let i = 0; i < len; i++) {
|
68
|
+
r[i] = selfArray[i]!;
|
69
|
+
}
|
70
|
+
return r.asImmutableArray;
|
71
|
+
}
|
72
|
+
|
73
|
+
/**
|
74
|
+
* @tsplus fluent fncts.ImmutableArray crossWith
|
75
|
+
*/
|
76
|
+
export function crossWith_<A, B, C>(
|
77
|
+
self: ImmutableArray<A>,
|
78
|
+
fb: ImmutableArray<B>,
|
79
|
+
f: (a: A, b: B) => C,
|
80
|
+
): ImmutableArray<C> {
|
81
|
+
return self.flatMap((a) => fb.map((b) => f(a, b)));
|
82
|
+
}
|
83
|
+
|
84
|
+
/**
|
85
|
+
* @tsplus static fncts.ImmutableArrayOps chainRecDepthFirst
|
86
|
+
*/
|
87
|
+
export function chainRecDepthFirst<A, B>(a: A, f: (a: A) => ImmutableArray<Either<A, B>>): ImmutableArray<B> {
|
88
|
+
const buffer = f(a).slice().unsafeAsMutable;
|
89
|
+
const out: B[] = [];
|
90
|
+
|
91
|
+
while (buffer.length > 0) {
|
92
|
+
const e = buffer.shift()!;
|
93
|
+
if (e._tag === EitherTag.Left) {
|
94
|
+
buffer.unshift(...f(e.left));
|
95
|
+
} else {
|
96
|
+
out.push(e.right);
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
return out.asImmutableArray;
|
101
|
+
}
|
102
|
+
|
103
|
+
/**
|
104
|
+
* @tsplus static fncts.ImmutableArrayOps chainRecBreadthFirst
|
105
|
+
*/
|
106
|
+
export function chainRecBreadthFirst<A, B>(a: A, f: (a: A) => ImmutableArray<Either<A, B>>): ImmutableArray<B> {
|
107
|
+
const initial = f(a);
|
108
|
+
const buffer: Array<Either<A, B>> = [];
|
109
|
+
const out: Array<B> = [];
|
110
|
+
|
111
|
+
function go(e: Either<A, B>): void {
|
112
|
+
if (e._tag === "Left") {
|
113
|
+
f(e.left).forEach((v) => buffer.push(v));
|
114
|
+
} else {
|
115
|
+
out.push(e.right);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
for (const e of initial) {
|
120
|
+
go(e);
|
121
|
+
}
|
122
|
+
|
123
|
+
while (buffer.length > 0) {
|
124
|
+
go(buffer.shift()!);
|
125
|
+
}
|
126
|
+
|
127
|
+
return out.asImmutableArray;
|
128
|
+
}
|
129
|
+
|
130
|
+
/**
|
131
|
+
* @tsplus fluent fncts.ImmutableArray flatMapWithIndex
|
132
|
+
*/
|
133
|
+
export function flatMapWithIndex_<A, B>(
|
134
|
+
self: ImmutableArray<A>,
|
135
|
+
f: (i: number, a: A) => ImmutableArray<B>,
|
136
|
+
): ImmutableArray<B> {
|
137
|
+
let outLen = 0;
|
138
|
+
const selfArray = self._array;
|
139
|
+
const len = selfArray.length;
|
140
|
+
const temp = Array<Array<B>>(len);
|
141
|
+
for (let i = 0; i < len; i++) {
|
142
|
+
const e = selfArray[i]!;
|
143
|
+
const arr = f(i, e)._array;
|
144
|
+
outLen += arr.length;
|
145
|
+
temp[i] = arr! as Array<B>;
|
146
|
+
}
|
147
|
+
const out = Array<B>(outLen);
|
148
|
+
let start = 0;
|
149
|
+
for (let i = 0; i < len; i++) {
|
150
|
+
const arr = temp[i]!;
|
151
|
+
const l = arr.length;
|
152
|
+
for (let j = 0; j < l; j++) {
|
153
|
+
out[j + start] = arr[j]!;
|
154
|
+
}
|
155
|
+
start += l;
|
156
|
+
}
|
157
|
+
return out.asImmutableArray;
|
158
|
+
}
|
159
|
+
|
160
|
+
/**
|
161
|
+
* @tsplus fluent fncts.ImmutableArray flatMap
|
162
|
+
*/
|
163
|
+
export function flatMap_<A, B>(self: ImmutableArray<A>, f: (a: A) => ImmutableArray<B>): ImmutableArray<B> {
|
164
|
+
return self.flatMapWithIndex((_, a) => f(a));
|
165
|
+
}
|
166
|
+
|
167
|
+
/**
|
168
|
+
* @tsplus getter fncts.ImmutableArray flatten
|
169
|
+
*/
|
170
|
+
export function flatten<A>(self: ImmutableArray<ImmutableArray<A>>): ImmutableArray<A> {
|
171
|
+
return self.flatMap(identity);
|
172
|
+
}
|
173
|
+
|
174
|
+
/**
|
175
|
+
* A useful recursion pattern for processing a `Array` to produce a new `Array`,
|
176
|
+
* often used for "chopping" up the input `Array`. Typically chop is called with some function
|
177
|
+
* that will consume an initial prefix of the `Array` and produce a value and the rest of the `Array`.
|
178
|
+
*
|
179
|
+
* @tsplus fluent fncts.ImmutableArray chop
|
180
|
+
*/
|
181
|
+
export function chop_<A, B>(
|
182
|
+
as: ImmutableArray<A>,
|
183
|
+
f: (as: ImmutableNonEmptyArray<A>) => readonly [B, ImmutableArray<A>],
|
184
|
+
): ImmutableArray<B> {
|
185
|
+
const result: Array<B> = [];
|
186
|
+
let cs: ImmutableArray<A> = as;
|
187
|
+
while (isNonEmpty(cs)) {
|
188
|
+
const [b, c] = f(cs);
|
189
|
+
result.push(b);
|
190
|
+
cs = c;
|
191
|
+
}
|
192
|
+
return result.asImmutableArray;
|
193
|
+
}
|
194
|
+
|
195
|
+
export const chop = Pipeable(chop_);
|
196
|
+
|
197
|
+
/**
|
198
|
+
* @tsplus fluent fncts.ImmutableArray chunksOf
|
199
|
+
*/
|
200
|
+
export function chunksOf_<A>(self: ImmutableArray<A>, n: number): ImmutableArray<ImmutableArray<A>> {
|
201
|
+
return self.chop((as) => as.splitAt(n));
|
202
|
+
}
|
203
|
+
|
204
|
+
/**
|
205
|
+
* @tsplus fluent fncts.ImmutableArray collectWhile
|
206
|
+
*/
|
207
|
+
export function collectWhile_<A, B>(as: ImmutableArray<A>, f: (a: A) => Maybe<B>): ImmutableArray<B> {
|
208
|
+
const result: Array<B> = [];
|
209
|
+
for (let i = 0; i < as.length; i++) {
|
210
|
+
const o = f(as._array[i]!);
|
211
|
+
if (o.isJust()) {
|
212
|
+
result.push(o.value);
|
213
|
+
} else {
|
214
|
+
break;
|
215
|
+
}
|
216
|
+
}
|
217
|
+
return result.asImmutableArray;
|
218
|
+
}
|
219
|
+
|
220
|
+
function comprehensionLoop<A, R>(
|
221
|
+
scope: ImmutableArray<A>,
|
222
|
+
input: ReadonlyArray<ImmutableArray<A>>,
|
223
|
+
f: (...xs: ReadonlyArray<A>) => R,
|
224
|
+
g: (...xs: ReadonlyArray<A>) => boolean,
|
225
|
+
): Eval<ImmutableArray<R>> {
|
226
|
+
if (input.length === 0) {
|
227
|
+
return g(...scope) ? Eval.now(ImmutableArray(f(...scope))) : Eval.now(ImmutableArray.empty());
|
228
|
+
} else {
|
229
|
+
return input[0]!
|
230
|
+
.traverse(Eval.Applicative)((a) => comprehensionLoop(scope.append(a), input.slice(1), f, g))
|
231
|
+
.map((rs) => rs.flatten);
|
232
|
+
}
|
233
|
+
}
|
234
|
+
|
235
|
+
/**
|
236
|
+
* @tsplus static fncts.ImmutableArrayOps comprehension
|
237
|
+
*/
|
238
|
+
export function comprehension<A, B, C, D, R>(
|
239
|
+
input: [ImmutableArray<A>, ImmutableArray<B>, ImmutableArray<C>, ImmutableArray<D>],
|
240
|
+
f: (a: A, b: B, c: C, d: D) => R,
|
241
|
+
g?: (a: A, b: B, c: C, d: D) => boolean,
|
242
|
+
): ImmutableArray<R>;
|
243
|
+
export function comprehension<A, B, C, R>(
|
244
|
+
input: [ImmutableArray<A>, ImmutableArray<B>, ImmutableArray<C>],
|
245
|
+
f: (a: A, b: B, c: C) => R,
|
246
|
+
g?: (a: A, b: B, c: C) => boolean,
|
247
|
+
): ImmutableArray<R>;
|
248
|
+
export function comprehension<A, B, R>(
|
249
|
+
input: [ImmutableArray<A>, ImmutableArray<B>],
|
250
|
+
f: (a: A, b: B) => R,
|
251
|
+
g?: (a: A, b: B) => boolean,
|
252
|
+
): ImmutableArray<R>;
|
253
|
+
export function comprehension<A, R>(
|
254
|
+
input: [ImmutableArray<A>],
|
255
|
+
f: (a: A) => R,
|
256
|
+
g?: (a: A) => boolean,
|
257
|
+
): ImmutableArray<R>;
|
258
|
+
export function comprehension<A, R>(
|
259
|
+
input: ReadonlyArray<ImmutableArray<A>>,
|
260
|
+
f: (...xs: ReadonlyArray<A>) => R,
|
261
|
+
g: (...xs: ReadonlyArray<A>) => boolean = () => true,
|
262
|
+
): ImmutableArray<R> {
|
263
|
+
return Eval.run(comprehensionLoop(ImmutableArray.empty(), input, f, g));
|
264
|
+
}
|
265
|
+
|
266
|
+
/**
|
267
|
+
* @tsplus fluent fncts.ImmutableArray concat
|
268
|
+
* @tsplus operator fncts.ImmutableArray +
|
269
|
+
* @tsplus operator fncts.base.MutableArray +
|
270
|
+
*/
|
271
|
+
export function concat_<A, B>(self: ImmutableArray<A>, that: ImmutableArray<B>): ImmutableArray<A | B> {
|
272
|
+
const lenx = self._array.length;
|
273
|
+
if (lenx === 0) {
|
274
|
+
return that;
|
275
|
+
}
|
276
|
+
const leny = that._array.length;
|
277
|
+
if (leny === 0) {
|
278
|
+
return self;
|
279
|
+
}
|
280
|
+
const r = Array<A | B>(lenx + leny);
|
281
|
+
for (let i = 0; i < lenx; i++) {
|
282
|
+
r[i] = self._array[i]!;
|
283
|
+
}
|
284
|
+
for (let i = 0; i < leny; i++) {
|
285
|
+
r[i + lenx] = that._array[i]!;
|
286
|
+
}
|
287
|
+
return r.asImmutableArray;
|
288
|
+
}
|
289
|
+
|
290
|
+
/**
|
291
|
+
* @tsplus fluent fncts.ImmutableArray deleteAt
|
292
|
+
*/
|
293
|
+
export function deleteAt_<A>(as: ImmutableArray<A>, i: number): Maybe<ImmutableArray<A>> {
|
294
|
+
return as.isOutOfBound(i) ? Nothing() : Just(as.unsafeDeleteAt(i));
|
295
|
+
}
|
296
|
+
|
297
|
+
/**
|
298
|
+
* @constrained
|
299
|
+
*/
|
300
|
+
export function difference_<A>(E: P.Eq<A>) {
|
301
|
+
const elemE_ = elem_(E);
|
302
|
+
return (self: ImmutableArray<A>, ys: ImmutableArray<A>): ImmutableArray<A> => self.filter((a) => !elemE_(ys, a));
|
303
|
+
}
|
304
|
+
|
305
|
+
/**
|
306
|
+
* @tsplus getter fncts.ImmutableArray difference
|
307
|
+
*/
|
308
|
+
export function differenceSelf<A>(self: ImmutableArray<A>) {
|
309
|
+
return (E: P.Eq<A>) =>
|
310
|
+
(that: ImmutableArray<A>): ImmutableArray<A> =>
|
311
|
+
difference_(E)(self, that);
|
312
|
+
}
|
313
|
+
|
314
|
+
/**
|
315
|
+
* @tsplus fluent fncts.ImmutableArray drop
|
316
|
+
*/
|
317
|
+
export function drop_<A>(self: ImmutableArray<A>, n: number): ImmutableArray<A> {
|
318
|
+
return self.slice(n);
|
319
|
+
}
|
320
|
+
|
321
|
+
/**
|
322
|
+
* @tsplus fluent fncts.ImmutableArray dropLast
|
323
|
+
*/
|
324
|
+
export function dropLast_<A>(self: ImmutableArray<A>, n: number): ImmutableArray<A> {
|
325
|
+
return self.slice(0, self.length - n);
|
326
|
+
}
|
327
|
+
|
328
|
+
/**
|
329
|
+
* @tsplus fluent fncts.ImmutableArray dropWhile
|
330
|
+
*/
|
331
|
+
export function dropWhile_<A>(self: ImmutableArray<A>, p: Predicate<A>): ImmutableArray<A> {
|
332
|
+
return self.slice(self.spanIndexLeft(p));
|
333
|
+
}
|
334
|
+
|
335
|
+
/**
|
336
|
+
* @tsplus fluent fncts.ImmutableArray dropLastWhile
|
337
|
+
*/
|
338
|
+
export function dropLastWhile_<A>(as: ImmutableArray<A>, p: Predicate<A>): ImmutableArray<A> {
|
339
|
+
return as.slice(0, as.spanIndexRight(p) + 1);
|
340
|
+
}
|
341
|
+
|
342
|
+
/**
|
343
|
+
* Test if a value is a member of an array. Takes an `Eq<A>` as a single
|
344
|
+
* argument which returns the function to use to search for a value of type `A` in
|
345
|
+
* an array of type `ImmutableArray<A>`.
|
346
|
+
*
|
347
|
+
* @constrained
|
348
|
+
*/
|
349
|
+
export function elem_<A>(E: P.Eq<A>) {
|
350
|
+
return (as: ImmutableArray<A>, a: A): boolean => {
|
351
|
+
const predicate = (element: A) => E.equals_(element, a);
|
352
|
+
const len = as.length;
|
353
|
+
for (let i = 0; i < len; i++) {
|
354
|
+
if (predicate(as._array[i]!)) {
|
355
|
+
return true;
|
356
|
+
}
|
357
|
+
}
|
358
|
+
return false;
|
359
|
+
};
|
360
|
+
}
|
361
|
+
|
362
|
+
/**
|
363
|
+
* Test if a value is a member of an array. Takes an `Eq<A>` as a single
|
364
|
+
* argument which returns the function to use to search for a value of type `A` in
|
365
|
+
* an array of type `ImmutableArray<A>`.
|
366
|
+
*
|
367
|
+
* @tsplus getter fncts.ImmutableArray elem
|
368
|
+
*/
|
369
|
+
export function elemSelf<A>(self: ImmutableArray<A>) {
|
370
|
+
return (E: P.Eq<A>) =>
|
371
|
+
(a: A): boolean =>
|
372
|
+
elem_(E)(self, a);
|
373
|
+
}
|
374
|
+
|
375
|
+
/**
|
376
|
+
* @tsplus fluent fncts.ImmutableArray every
|
377
|
+
*/
|
378
|
+
export function every_<A, B extends A>(self: ImmutableArray<A>, p: Refinement<A, B>): self is ImmutableArray<B>;
|
379
|
+
export function every_<A>(self: ImmutableArray<A>, p: Predicate<A>): boolean;
|
380
|
+
export function every_<A>(self: ImmutableArray<A>, p: Predicate<A>): boolean {
|
381
|
+
return self.everyWithIndex((_, a) => p(a));
|
382
|
+
}
|
383
|
+
|
384
|
+
/**
|
385
|
+
* @tsplus fluent fncts.ImmutableArray everyWithIndex
|
386
|
+
*/
|
387
|
+
export function everyWithIndex_<A, B extends A>(
|
388
|
+
self: ImmutableArray<A>,
|
389
|
+
p: RefinementWithIndex<number, A, B>,
|
390
|
+
): self is ImmutableArray<B>;
|
391
|
+
export function everyWithIndex_<A>(self: ImmutableArray<A>, p: PredicateWithIndex<number, A>): boolean;
|
392
|
+
export function everyWithIndex_<A>(self: ImmutableArray<A>, p: PredicateWithIndex<number, A>): boolean {
|
393
|
+
let result = true;
|
394
|
+
let i = 0;
|
395
|
+
while (result && i < self.length) {
|
396
|
+
result = p(i, self._array[i]!);
|
397
|
+
i++;
|
398
|
+
}
|
399
|
+
return result;
|
400
|
+
}
|
401
|
+
|
402
|
+
/**
|
403
|
+
* @tsplus fluent fncts.ImmutableArray exists
|
404
|
+
*/
|
405
|
+
export function exists_<A>(self: ImmutableArray<A>, p: Predicate<A>): self is ImmutableNonEmptyArray<A> {
|
406
|
+
let result = false;
|
407
|
+
let i = 0;
|
408
|
+
while (!result && i < self.length) {
|
409
|
+
result = p(self._array[i]!);
|
410
|
+
i++;
|
411
|
+
}
|
412
|
+
return result;
|
413
|
+
}
|
414
|
+
|
415
|
+
/**
|
416
|
+
* @tsplus fluent fncts.ImmutableArray filter
|
417
|
+
*/
|
418
|
+
export function filter_<A, B extends A>(self: ImmutableArray<A>, p: Refinement<A, B>): ImmutableArray<B>;
|
419
|
+
export function filter_<A>(self: ImmutableArray<A>, p: Predicate<A>): ImmutableArray<A>;
|
420
|
+
export function filter_<A>(self: ImmutableArray<A>, p: Predicate<A>): ImmutableArray<A> {
|
421
|
+
return self.filterWithIndex((_, a) => p(a));
|
422
|
+
}
|
423
|
+
|
424
|
+
/**
|
425
|
+
* @tsplus fluent fncts.ImmutableArray filterWithIndex
|
426
|
+
*/
|
427
|
+
export function filterWithIndex_<A, B extends A>(
|
428
|
+
self: ImmutableArray<A>,
|
429
|
+
p: RefinementWithIndex<number, A, B>,
|
430
|
+
): ImmutableArray<B>;
|
431
|
+
export function filterWithIndex_<A>(self: ImmutableArray<A>, p: PredicateWithIndex<number, A>): ImmutableArray<A>;
|
432
|
+
export function filterWithIndex_<A>(self: ImmutableArray<A>, p: PredicateWithIndex<number, A>): ImmutableArray<A> {
|
433
|
+
const result: Array<A> = [];
|
434
|
+
for (let i = 0; i < self.length; i++) {
|
435
|
+
const a = self._array[i]!;
|
436
|
+
if (p(i, a)) {
|
437
|
+
result.push(a);
|
438
|
+
}
|
439
|
+
}
|
440
|
+
return result.asImmutableArray;
|
441
|
+
}
|
442
|
+
|
443
|
+
/**
|
444
|
+
* @tsplus fluent fncts.ImmutableArray filterMapWithIndex
|
445
|
+
*/
|
446
|
+
export function filterMapWithIndex_<A, B>(fa: ImmutableArray<A>, f: (i: number, a: A) => Maybe<B>): ImmutableArray<B> {
|
447
|
+
const result = [];
|
448
|
+
for (let i = 0; i < fa.length; i++) {
|
449
|
+
const maybeB = f(i, fa[i]!);
|
450
|
+
if (maybeB.isJust()) {
|
451
|
+
result.push(maybeB.value);
|
452
|
+
}
|
453
|
+
}
|
454
|
+
return result.asImmutableArray;
|
455
|
+
}
|
456
|
+
|
457
|
+
/**
|
458
|
+
* @tsplus fluent fncts.ImmutableArray filterMap
|
459
|
+
*/
|
460
|
+
export function filterMap_<A, B>(self: ImmutableArray<A>, f: (a: A) => Maybe<B>): ImmutableArray<B> {
|
461
|
+
return self.filterMapWithIndex((_, a) => f(a));
|
462
|
+
}
|
463
|
+
|
464
|
+
/**
|
465
|
+
* @tsplus fluent fncts.ImmutableArray find
|
466
|
+
*/
|
467
|
+
export function find_<A, B extends A>(self: ImmutableArray<A>, p: Refinement<A, B>): Maybe<B>;
|
468
|
+
export function find_<A>(self: ImmutableArray<A>, p: Predicate<A>): Maybe<A>;
|
469
|
+
export function find_<A>(self: ImmutableArray<A>, p: Predicate<A>): Maybe<A> {
|
470
|
+
return self.findWithIndex((_, a) => p(a));
|
471
|
+
}
|
472
|
+
|
473
|
+
/**
|
474
|
+
* @tsplus fluent fncts.ImmutableArray findIndex
|
475
|
+
*/
|
476
|
+
export function findIndex_<A>(as: ImmutableArray<A>, predicate: Predicate<A>): Maybe<number> {
|
477
|
+
return as.findMapWithIndex((i, a) => (predicate(a) ? Just(i) : Nothing()));
|
478
|
+
}
|
479
|
+
|
480
|
+
/**
|
481
|
+
* @tsplus fluent fncts.ImmutableArray findWithIndex
|
482
|
+
*/
|
483
|
+
export function findWithIndex_<A, B extends A>(as: ImmutableArray<A>, p: RefinementWithIndex<number, A, B>): Maybe<B>;
|
484
|
+
export function findWithIndex_<A>(as: ImmutableArray<A>, p: PredicateWithIndex<number, A>): Maybe<A>;
|
485
|
+
export function findWithIndex_<A>(as: ImmutableArray<A>, p: PredicateWithIndex<number, A>): Maybe<A> {
|
486
|
+
const len = as.length;
|
487
|
+
for (let i = 0; i < len; i++) {
|
488
|
+
if (p(i, as._array[i]!)) {
|
489
|
+
return Just(as._array[i]!);
|
490
|
+
}
|
491
|
+
}
|
492
|
+
return Nothing();
|
493
|
+
}
|
494
|
+
|
495
|
+
/**
|
496
|
+
* @tsplus fluent fncts.ImmutableArray findMap
|
497
|
+
*/
|
498
|
+
export function findMap_<A, B>(as: ImmutableArray<A>, f: (a: A) => Maybe<B>): Maybe<B> {
|
499
|
+
return as.findMapWithIndex((_, a) => f(a));
|
500
|
+
}
|
501
|
+
|
502
|
+
/**
|
503
|
+
* @tsplus fluent fncts.ImmutableArray findMapWithIndex
|
504
|
+
*/
|
505
|
+
export function findMapWithIndex_<A, B>(as: ImmutableArray<A>, f: (index: number, a: A) => Maybe<B>): Maybe<B> {
|
506
|
+
const len = as.length;
|
507
|
+
for (let i = 0; i < len; i++) {
|
508
|
+
const v = f(i, as._array[i]!);
|
509
|
+
if (v.isJust()) {
|
510
|
+
return v;
|
511
|
+
}
|
512
|
+
}
|
513
|
+
return Nothing();
|
514
|
+
}
|
515
|
+
|
516
|
+
/**
|
517
|
+
* @tsplus fluent fncts.ImmutableArray findLast
|
518
|
+
*/
|
519
|
+
export function findLast_<A, B extends A>(as: ImmutableArray<A>, p: Refinement<A, B>): Maybe<B>;
|
520
|
+
export function findLast_<A>(as: ImmutableArray<A>, p: Predicate<A>): Maybe<A>;
|
521
|
+
export function findLast_<A>(as: ImmutableArray<A>, p: Predicate<A>): Maybe<A> {
|
522
|
+
const len = as.length;
|
523
|
+
for (let i = len - 1; i >= 0; i--) {
|
524
|
+
if (p(as._array[i]!)) {
|
525
|
+
return Just(as._array[i]!);
|
526
|
+
}
|
527
|
+
}
|
528
|
+
return Nothing();
|
529
|
+
}
|
530
|
+
|
531
|
+
/**
|
532
|
+
* @tsplus fluent fncts.ImmutableArray findLastIndex
|
533
|
+
*/
|
534
|
+
export function findLastIndex_<A>(self: ImmutableArray<A>, p: Predicate<A>): Maybe<number> {
|
535
|
+
return self.findLastMapWithIndex((i, a) => (p(a) ? Just(i) : Nothing()));
|
536
|
+
}
|
537
|
+
|
538
|
+
/**
|
539
|
+
* @tsplus fluent fncts.ImmutableArray findLastMap
|
540
|
+
*/
|
541
|
+
export function findLastMap_<A, B>(as: ImmutableArray<A>, f: (a: A) => Maybe<B>): Maybe<B> {
|
542
|
+
return as.findLastMapWithIndex((_, a) => f(a));
|
543
|
+
}
|
544
|
+
|
545
|
+
/**
|
546
|
+
* @tsplus fluent fncts.ImmutableArray findLastMapWithIndex
|
547
|
+
*/
|
548
|
+
export function findLastMapWithIndex_<A, B>(as: ImmutableArray<A>, f: (i: number, a: A) => Maybe<B>): Maybe<B> {
|
549
|
+
const len = as.length;
|
550
|
+
for (let i = len - 1; i >= 0; i--) {
|
551
|
+
const v = f(i, as._array[i]!);
|
552
|
+
if (v.isJust()) {
|
553
|
+
return v;
|
554
|
+
}
|
555
|
+
}
|
556
|
+
return Nothing();
|
557
|
+
}
|
558
|
+
|
559
|
+
/**
|
560
|
+
* @tsplus fluent fncts.ImmutableArray foldLeftWithIndex
|
561
|
+
* @tsplus fluent fncts.base.MutableArray foldLeftWithIndex
|
562
|
+
*/
|
563
|
+
export function foldLeftWithIndex_<A, B>(self: ImmutableArray<A>, b: B, f: (i: number, b: B, a: A) => B): B {
|
564
|
+
const len = self.length;
|
565
|
+
let r = b;
|
566
|
+
for (let i = 0; i < len; i++) {
|
567
|
+
r = f(i, r, self._array[i]!);
|
568
|
+
}
|
569
|
+
return r;
|
570
|
+
}
|
571
|
+
|
572
|
+
/**
|
573
|
+
* @tsplus fluent fncts.ImmutableArray foldLeft
|
574
|
+
* @tsplus fluent fncts.base.MutableArray foldLeft
|
575
|
+
*/
|
576
|
+
export function foldLeft_<A, B>(self: ImmutableArray<A>, b: B, f: (b: B, a: A) => B): B {
|
577
|
+
return self.foldLeftWithIndex(b, (_, b, a) => f(b, a));
|
578
|
+
}
|
579
|
+
|
580
|
+
/**
|
581
|
+
* @tsplus fluent fncts.ImmutableArray foldLeftWhile
|
582
|
+
* @tsplus fluent fncts.base.MutableArray foldLeftWhile
|
583
|
+
*/
|
584
|
+
export function foldLeftWhile_<A, B>(self: ImmutableArray<A>, b: B, p: Predicate<B>, f: (b: B, a: A) => B): B {
|
585
|
+
return self.foldLeftWithIndexWhile(b, p, (_, b, a) => f(b, a));
|
586
|
+
}
|
587
|
+
|
588
|
+
/**
|
589
|
+
* @tsplus fluent fncts.ImmutableArray foldLeftWithIndexWhile
|
590
|
+
* @tsplus fluent fncts.base.MutableArray foldLeftWithIndexWhile
|
591
|
+
*/
|
592
|
+
export function foldLeftWithIndexWhile_<A, B>(
|
593
|
+
self: ImmutableArray<A>,
|
594
|
+
b: B,
|
595
|
+
p: Predicate<B>,
|
596
|
+
f: (i: number, b: B, a: A) => B,
|
597
|
+
): B {
|
598
|
+
let out = b;
|
599
|
+
let cont = p(out);
|
600
|
+
for (let i = 0; cont && i < self.length; i++) {
|
601
|
+
out = f(i, out, self._array[i]!);
|
602
|
+
cont = p(out);
|
603
|
+
}
|
604
|
+
return out;
|
605
|
+
}
|
606
|
+
|
607
|
+
export function fold<M>(M: Monoid<M>) {
|
608
|
+
return (self: ImmutableArray<M>): M => self.foldLeft(M.nat, M.combine_);
|
609
|
+
}
|
610
|
+
|
611
|
+
/**
|
612
|
+
* @tsplus fluent fncts.ImmutableArray fold
|
613
|
+
* @tsplus fluent fncts.base.MutableArray fold
|
614
|
+
*/
|
615
|
+
export function foldSelf<M>(self: ImmutableArray<M>, M: Monoid<M>): M {
|
616
|
+
return self.foldLeft(M.nat, M.combine_);
|
617
|
+
}
|
618
|
+
|
619
|
+
/**
|
620
|
+
* @constrained
|
621
|
+
*/
|
622
|
+
export function foldMapWithIndex_<M>(M: Monoid<M>) {
|
623
|
+
return <A>(self: ImmutableArray<A>, f: (i: number, a: A) => M): M => {
|
624
|
+
return self.foldLeftWithIndex(M.nat, (i, b, a) => M.combine_(b, f(i, a)));
|
625
|
+
};
|
626
|
+
}
|
627
|
+
|
628
|
+
/**
|
629
|
+
* @tsplus getter fncts.ImmutableArray foldMapWithIndex
|
630
|
+
* @tsplus getter fncts.base.MutableArray foldMapWithIndex
|
631
|
+
*/
|
632
|
+
export function foldMapWithIndexSelf<A>(self: ImmutableArray<A>) {
|
633
|
+
return <M>(M: Monoid<M>) =>
|
634
|
+
(f: (i: number, a: A) => M): M =>
|
635
|
+
foldMapWithIndex_(M)(self, f);
|
636
|
+
}
|
637
|
+
|
638
|
+
/**
|
639
|
+
* @constrained
|
640
|
+
*/
|
641
|
+
export function foldMap_<M>(M: Monoid<M>) {
|
642
|
+
return <A>(self: ImmutableArray<A>, f: (a: A) => M): M => {
|
643
|
+
return self.foldMapWithIndex(M)((_, a) => f(a));
|
644
|
+
};
|
645
|
+
}
|
646
|
+
|
647
|
+
/**
|
648
|
+
* @tsplus getter fncts.ImmutableArray foldMap
|
649
|
+
* @tsplus getter fncts.base.MutableArray foldMap
|
650
|
+
*/
|
651
|
+
export function foldMapSelf<A>(self: ImmutableArray<A>) {
|
652
|
+
return <M>(M: Monoid<M>) =>
|
653
|
+
(f: (a: A) => M): M =>
|
654
|
+
self.foldMapWithIndex(M)((_, a) => f(a));
|
655
|
+
}
|
656
|
+
|
657
|
+
/**
|
658
|
+
* @tsplus fluent fncts.ImmutableArray foldRightWithIndex
|
659
|
+
* @tsplus fluent fncts.base.MutableArray foldRightWithIndex
|
660
|
+
*/
|
661
|
+
export function foldRightWithIndex_<A, B>(self: ImmutableArray<A>, b: B, f: (i: number, a: A, b: B) => B): B {
|
662
|
+
let r = b;
|
663
|
+
for (let i = self.length - 1; i >= 0; i--) {
|
664
|
+
r = f(i, self._array[i]!, r);
|
665
|
+
}
|
666
|
+
return r;
|
667
|
+
}
|
668
|
+
|
669
|
+
/**
|
670
|
+
* @tsplus fluent fncts.ImmutableArray foldRight
|
671
|
+
* @tsplus fluent fncts.base.MutableArray foldRight
|
672
|
+
*/
|
673
|
+
export function foldRight_<A, B>(self: ImmutableArray<A>, b: B, f: (a: A, b: B) => B): B {
|
674
|
+
return self.foldRightWithIndex(b, (_, a, b) => f(a, b));
|
675
|
+
}
|
676
|
+
|
677
|
+
/**
|
678
|
+
* @tsplus fluent fncts.ImmutableArray foldRighWhile
|
679
|
+
* @tsplus fluent fncts.base.MutableArray foldRightWhile
|
680
|
+
*/
|
681
|
+
export function foldRightWhile_<A, B>(self: ImmutableArray<A>, b: B, p: Predicate<B>, f: (a: A, b: B) => B): B {
|
682
|
+
return self.foldRightWithIndexWhile(b, p, (_, a, b) => f(a, b));
|
683
|
+
}
|
684
|
+
|
685
|
+
/**
|
686
|
+
* @tsplus fluent fncts.ImmutableArray foldRightWithIndexWhile
|
687
|
+
* @tsplus fluent fncts.base.MutableArray foldRightWithIndexWhile
|
688
|
+
*/
|
689
|
+
export function foldRightWithIndexWhile_<A, B>(
|
690
|
+
self: ImmutableArray<A>,
|
691
|
+
b: B,
|
692
|
+
predicate: Predicate<B>,
|
693
|
+
f: (i: number, a: A, b: B) => B,
|
694
|
+
): B {
|
695
|
+
let out = b;
|
696
|
+
let cont = predicate(out);
|
697
|
+
for (let i = self.length - 1; cont && i >= 0; i--) {
|
698
|
+
out = f(i, self._array[i]!, out);
|
699
|
+
cont = predicate(out);
|
700
|
+
}
|
701
|
+
return out;
|
702
|
+
}
|
703
|
+
|
704
|
+
/**
|
705
|
+
* @tsplus fluent fncts.ImmutableArray forEach
|
706
|
+
*/
|
707
|
+
export function forEach_<A, B>(self: ImmutableArray<A>, f: (a: A) => B): void {
|
708
|
+
return self.forEach(f);
|
709
|
+
}
|
710
|
+
|
711
|
+
/**
|
712
|
+
* @tsplus fluent fncts.ImmutableArray get
|
713
|
+
* @tsplus fluent fncts.base.MutableArray get
|
714
|
+
*/
|
715
|
+
export function get_<A>(self: ImmutableArray<A>, i: number): Maybe<A> {
|
716
|
+
return self.isOutOfBound(i) ? Nothing() : Just(self._array[i]!);
|
717
|
+
}
|
718
|
+
|
719
|
+
export function group<A>(E: P.Eq<A>): (self: ImmutableArray<A>) => ImmutableArray<ImmutableNonEmptyArray<A>> {
|
720
|
+
return chop((self) => {
|
721
|
+
const h = self._array[0]!;
|
722
|
+
const out = [h];
|
723
|
+
let i = 1;
|
724
|
+
for (; i < self.length; i++) {
|
725
|
+
const a = self._array[i]!;
|
726
|
+
if (E.equals_(a, h)) {
|
727
|
+
out.push(a);
|
728
|
+
} else {
|
729
|
+
break;
|
730
|
+
}
|
731
|
+
}
|
732
|
+
return [out.unsafeAsNonEmptyArray, self.slice(i)];
|
733
|
+
});
|
734
|
+
}
|
735
|
+
|
736
|
+
/**
|
737
|
+
* @tsplus fluent fncts.ImmutableArray group
|
738
|
+
*/
|
739
|
+
export function chopSelf<A>(self: ImmutableArray<A>, E: P.Eq<A>): ImmutableArray<ImmutableNonEmptyArray<A>> {
|
740
|
+
return group(E)(self);
|
741
|
+
}
|
742
|
+
|
743
|
+
/**
|
744
|
+
* @tsplus fluent fncts.ImmutableArray groupBy
|
745
|
+
*/
|
746
|
+
export function groupBy_<A>(
|
747
|
+
self: ImmutableArray<A>,
|
748
|
+
f: (a: A) => string,
|
749
|
+
): Readonly<Record<string, ImmutableNonEmptyArray<A>>> {
|
750
|
+
const out: Record<string, NonEmptyArray<A>> = {};
|
751
|
+
for (let i = 0; i < self.length; i++) {
|
752
|
+
const a = self._array[i]!;
|
753
|
+
const k = f(a);
|
754
|
+
if (Object.prototype.hasOwnProperty.call(out, k)) {
|
755
|
+
out[k]!.push(a);
|
756
|
+
} else {
|
757
|
+
out[k] = [a];
|
758
|
+
}
|
759
|
+
}
|
760
|
+
return Dictionary.get(out).map(ImmutableNonEmptyArray.from).toRecord;
|
761
|
+
}
|
762
|
+
|
763
|
+
/**
|
764
|
+
* @tsplus getter fncts.ImmutableArray head
|
765
|
+
*/
|
766
|
+
export function head<A>(self: ImmutableArray<A>): Maybe<A> {
|
767
|
+
return self.isNonEmpty() ? Just(self._array[0]) : Nothing();
|
768
|
+
}
|
769
|
+
|
770
|
+
/**
|
771
|
+
* @tsplus getter fncts.ImmutableArray init
|
772
|
+
*/
|
773
|
+
export function init<A>(self: ImmutableArray<A>): Maybe<ImmutableArray<A>> {
|
774
|
+
const len = self.length;
|
775
|
+
return len === 0 ? Nothing() : Just(self.slice(0, len - 1));
|
776
|
+
}
|
777
|
+
|
778
|
+
/**
|
779
|
+
* @tsplus fluent fncts.ImmutableArray insertAt
|
780
|
+
*/
|
781
|
+
export function insertAt_<A>(self: ImmutableArray<A>, i: number, a: A): Maybe<ImmutableNonEmptyArray<A>> {
|
782
|
+
return self.isOutOfBound(i) ? Nothing() : Just(self.unsafeInsertAt(i, a));
|
783
|
+
}
|
784
|
+
|
785
|
+
export function intersection_<A>(E: P.Eq<A>) {
|
786
|
+
const elemE = elem_(E);
|
787
|
+
return (self: ImmutableArray<A>, that: ImmutableArray<A>): ImmutableArray<A> => self.filter((a) => elemE(that, a));
|
788
|
+
}
|
789
|
+
|
790
|
+
/**
|
791
|
+
* @tsplus getter fncts.ImmutableArray intersection
|
792
|
+
*/
|
793
|
+
export function intersectionSelf<A>(self: ImmutableArray<A>) {
|
794
|
+
return (E: P.Eq<A>) =>
|
795
|
+
(that: ImmutableArray<A>): ImmutableArray<A> =>
|
796
|
+
intersection_(E)(self, that);
|
797
|
+
}
|
798
|
+
|
799
|
+
export function intersperse_<A>(self: ImmutableArray<A>, a: A): ImmutableArray<A> {
|
800
|
+
const len = self.length;
|
801
|
+
return len === 0 ? self : self.slice(1, len).prependAll(a).prepend(self[0]!);
|
802
|
+
}
|
803
|
+
|
804
|
+
/**
|
805
|
+
* @tsplus fluent fncts.ImmutableArray isEmpty
|
806
|
+
*/
|
807
|
+
export function isEmpty<A>(self: ImmutableArray<A>): boolean {
|
808
|
+
return self.length === 0;
|
809
|
+
}
|
810
|
+
|
811
|
+
/**
|
812
|
+
* @tsplus fluent fncts.ImmutableArray isNonEmpty
|
813
|
+
*/
|
814
|
+
export function isNonEmpty<A>(self: ImmutableArray<A>): self is ImmutableNonEmptyArray<A> {
|
815
|
+
return self.length > 0;
|
816
|
+
}
|
817
|
+
|
818
|
+
/**
|
819
|
+
* @tsplus fluent fncts.ImmutableArray isOutOfBound
|
820
|
+
*/
|
821
|
+
export function isOutOfBound_<A>(self: ImmutableArray<A>, i: number): boolean {
|
822
|
+
return i < 0 || i >= self.length;
|
823
|
+
}
|
824
|
+
|
825
|
+
/**
|
826
|
+
* @tsplus fluent fncts.ImmutableArray join
|
827
|
+
*/
|
828
|
+
export function join(self: ImmutableArray<string>, separator: string): string {
|
829
|
+
return self._array.join(separator);
|
830
|
+
}
|
831
|
+
|
832
|
+
/**
|
833
|
+
* @tsplus getter fncts.ImmutableArray last
|
834
|
+
*/
|
835
|
+
export function last<A>(self: ImmutableArray<A>): Maybe<A> {
|
836
|
+
return self.get(self.length - 1);
|
837
|
+
}
|
838
|
+
|
839
|
+
/**
|
840
|
+
* @tsplus getter fncts.ImmutableArray length
|
841
|
+
*/
|
842
|
+
export function length<A>(self: ImmutableArray<A>): number {
|
843
|
+
return self._array.length;
|
844
|
+
}
|
845
|
+
|
846
|
+
/**
|
847
|
+
* @tsplus getter fncts.ImmutableArray lefts
|
848
|
+
*/
|
849
|
+
export function lefts<E, A>(self: ImmutableArray<Either<E, A>>): ImmutableArray<E> {
|
850
|
+
const ls: Array<E> = [];
|
851
|
+
for (let i = 0; i < self.length; i++) {
|
852
|
+
const a = self._array[i]!;
|
853
|
+
if (a._tag === EitherTag.Left) {
|
854
|
+
ls.push(a.left);
|
855
|
+
}
|
856
|
+
}
|
857
|
+
return ls.asImmutableArray;
|
858
|
+
}
|
859
|
+
|
860
|
+
/**
|
861
|
+
* @tsplus fluent fncts.ImmutableArray map
|
862
|
+
*/
|
863
|
+
export function map_<A, B>(self: ImmutableArray<A>, f: (a: A) => B): ImmutableArray<B> {
|
864
|
+
return self.mapWithIndex((_, a) => f(a));
|
865
|
+
}
|
866
|
+
|
867
|
+
/**
|
868
|
+
* @tsplus fluent fncts.ImmutableArray mapAccum
|
869
|
+
*/
|
870
|
+
export function mapAccum_<A, S, B>(
|
871
|
+
self: ImmutableArray<A>,
|
872
|
+
s: S,
|
873
|
+
f: (s: S, a: A) => readonly [B, S],
|
874
|
+
): readonly [ImmutableArray<B>, S] {
|
875
|
+
const bs = Array<B>(self.length);
|
876
|
+
let state = s;
|
877
|
+
for (let i = 0; i < self.length; i++) {
|
878
|
+
const result = f(state, self._array[i]!);
|
879
|
+
bs[i] = result[0];
|
880
|
+
state = result[1];
|
881
|
+
}
|
882
|
+
return [bs.asImmutableArray, state];
|
883
|
+
}
|
884
|
+
|
885
|
+
/**
|
886
|
+
* @tsplus fluent fncts.ImmutableArray mapWithIndex
|
887
|
+
*/
|
888
|
+
export function mapWithIndex_<A, B>(self: ImmutableArray<A>, f: (i: number, a: A) => B): ImmutableArray<B> {
|
889
|
+
const len = self._array.length;
|
890
|
+
const bs = Array<B>(len);
|
891
|
+
for (let i = 0; i < len; i++) {
|
892
|
+
bs[i] = f(i, self._array[i]!);
|
893
|
+
}
|
894
|
+
return bs.asImmutableArray;
|
895
|
+
}
|
896
|
+
|
897
|
+
/**
|
898
|
+
* @tsplus fluent fncts.ImmutableArray modifyAt
|
899
|
+
*/
|
900
|
+
export function modifyAt_<A>(self: ImmutableArray<A>, i: number, f: (a: A) => A): Maybe<ImmutableArray<A>> {
|
901
|
+
return self.isOutOfBound(i) ? Nothing() : Just(self.unsafeModifyAt(i, f));
|
902
|
+
}
|
903
|
+
|
904
|
+
/**
|
905
|
+
* @tsplus fluent fncts.ImmutableArray mutate
|
906
|
+
*/
|
907
|
+
export function mutate_<A>(self: ImmutableArray<A>, f: (self: Array<A>) => void): ImmutableArray<A> {
|
908
|
+
const mut = mutableClone(self);
|
909
|
+
f(mut);
|
910
|
+
return mut.asImmutableArray;
|
911
|
+
}
|
912
|
+
|
913
|
+
/**
|
914
|
+
* @tsplus getter fncts.ImmutableArray mutableClone
|
915
|
+
*/
|
916
|
+
export function mutableClone<A>(self: ImmutableArray<A>): Array<A> {
|
917
|
+
return self.slice(0)._array as Array<A>;
|
918
|
+
}
|
919
|
+
|
920
|
+
/**
|
921
|
+
* @tsplus fluent fncts.ImmutableArray partitionWithIndex
|
922
|
+
*/
|
923
|
+
export function partitionWithIndex_<A, B extends A>(
|
924
|
+
self: ImmutableArray<A>,
|
925
|
+
p: RefinementWithIndex<number, A, B>,
|
926
|
+
): readonly [ImmutableArray<A>, ImmutableArray<B>];
|
927
|
+
export function partitionWithIndex_<A>(
|
928
|
+
self: ImmutableArray<A>,
|
929
|
+
p: PredicateWithIndex<number, A>,
|
930
|
+
): readonly [ImmutableArray<A>, ImmutableArray<A>];
|
931
|
+
export function partitionWithIndex_<A>(
|
932
|
+
self: ImmutableArray<A>,
|
933
|
+
p: PredicateWithIndex<number, A>,
|
934
|
+
): readonly [ImmutableArray<A>, ImmutableArray<A>] {
|
935
|
+
const left: Array<A> = [];
|
936
|
+
const right: Array<A> = [];
|
937
|
+
for (let i = 0; i < self.length; i++) {
|
938
|
+
const a = self._array[i]!;
|
939
|
+
if (p(i, a)) {
|
940
|
+
right.push(a);
|
941
|
+
} else {
|
942
|
+
left.push(a);
|
943
|
+
}
|
944
|
+
}
|
945
|
+
return [left.asImmutableArray, right.asImmutableArray];
|
946
|
+
}
|
947
|
+
|
948
|
+
/**
|
949
|
+
* @tsplus fluent fncts.ImmutableArray partition
|
950
|
+
*/
|
951
|
+
export function partition_<A, B extends A>(
|
952
|
+
self: ImmutableArray<A>,
|
953
|
+
p: Refinement<A, B>,
|
954
|
+
): readonly [ImmutableArray<A>, ImmutableArray<B>];
|
955
|
+
export function partition_<A>(
|
956
|
+
self: ImmutableArray<A>,
|
957
|
+
p: Predicate<A>,
|
958
|
+
): readonly [ImmutableArray<A>, ImmutableArray<A>];
|
959
|
+
export function partition_<A>(
|
960
|
+
self: ImmutableArray<A>,
|
961
|
+
p: Predicate<A>,
|
962
|
+
): readonly [ImmutableArray<A>, ImmutableArray<A>] {
|
963
|
+
return self.partitionWithIndex((_, a) => p(a));
|
964
|
+
}
|
965
|
+
|
966
|
+
/**
|
967
|
+
* @tsplus fluent fncts.ImmutableArray partitionMapWithIndex
|
968
|
+
*/
|
969
|
+
export function partitionMapWithIndex_<A, B, C>(
|
970
|
+
self: ImmutableArray<A>,
|
971
|
+
f: (i: number, a: A) => Either<B, C>,
|
972
|
+
): readonly [ImmutableArray<B>, ImmutableArray<C>] {
|
973
|
+
const left = [] as Array<B>;
|
974
|
+
const right = [] as Array<C>;
|
975
|
+
for (let i = 0; i < self.length; i++) {
|
976
|
+
const ea = f(i, self._array[i]!);
|
977
|
+
switch (ea._tag) {
|
978
|
+
case EitherTag.Left:
|
979
|
+
left.push(ea.left);
|
980
|
+
break;
|
981
|
+
case EitherTag.Right:
|
982
|
+
right.push(ea.right);
|
983
|
+
break;
|
984
|
+
}
|
985
|
+
}
|
986
|
+
return [left.asImmutableArray, right.asImmutableArray];
|
987
|
+
}
|
988
|
+
|
989
|
+
/**
|
990
|
+
* @tsplus fluent fncts.ImmutableArray partitionMap
|
991
|
+
*/
|
992
|
+
export function partitionMap_<A, B, C>(
|
993
|
+
self: ImmutableArray<A>,
|
994
|
+
f: (a: A) => Either<B, C>,
|
995
|
+
): readonly [ImmutableArray<B>, ImmutableArray<C>] {
|
996
|
+
return self.partitionMapWithIndex((_, a) => f(a));
|
997
|
+
}
|
998
|
+
|
999
|
+
/**
|
1000
|
+
* @tsplus fluent fncts.ImmutableArray prepend
|
1001
|
+
*/
|
1002
|
+
export function prepend_<A, B>(self: ImmutableArray<A>, head: B): ImmutableArray<A | B> {
|
1003
|
+
const len = self.length;
|
1004
|
+
const out = Array<A | B>(len + 1);
|
1005
|
+
out[0] = head;
|
1006
|
+
for (let i = 0; i < len; i++) {
|
1007
|
+
out[i + 1] = self._array[i]!;
|
1008
|
+
}
|
1009
|
+
return out.asImmutableArray;
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
/**
|
1013
|
+
* @tsplus fluent fncts.ImmutableArray prependAll
|
1014
|
+
* @tsplus fluent fncts.base.MutableArray prependAll
|
1015
|
+
*/
|
1016
|
+
export function prependAll_<A>(self: ImmutableArray<A>, a: A): ImmutableArray<A> {
|
1017
|
+
const out: Array<A> = [];
|
1018
|
+
for (let i = 0; i < self.length; i++) {
|
1019
|
+
out.push(a, self._array[i]!);
|
1020
|
+
}
|
1021
|
+
return out.asImmutableArray;
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
/**
|
1025
|
+
* @tsplus getter fncts.ImmutableArray reverse
|
1026
|
+
*/
|
1027
|
+
export function reverse<A>(self: ImmutableArray<A>): ImmutableArray<A> {
|
1028
|
+
if (self.isEmpty()) {
|
1029
|
+
return self;
|
1030
|
+
} else if (self.length === 1) {
|
1031
|
+
return ImmutableArray(self._array[0]!);
|
1032
|
+
} else {
|
1033
|
+
const out = Array<A>(self.length);
|
1034
|
+
for (let j = 0, i = self.length - 1; i >= 0; i--, j++) {
|
1035
|
+
out[j] = self._array[i]!;
|
1036
|
+
}
|
1037
|
+
return out.asImmutableArray;
|
1038
|
+
}
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
/**
|
1042
|
+
* @tsplus getter fncts.ImmutableArray rights
|
1043
|
+
*/
|
1044
|
+
export function rights<E, A>(self: ImmutableArray<Either<E, A>>): ImmutableArray<A> {
|
1045
|
+
const rs: Array<A> = [];
|
1046
|
+
for (let i = 0; i < self.length; i++) {
|
1047
|
+
const a = self._array[i]!;
|
1048
|
+
if (a._tag === EitherTag.Right) {
|
1049
|
+
rs.push(a.right);
|
1050
|
+
}
|
1051
|
+
}
|
1052
|
+
return rs.asImmutableArray;
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
/**
|
1056
|
+
* @tsplus fluent fncts.ImmutableArray rotate
|
1057
|
+
*/
|
1058
|
+
export function rotate_<A>(self: ImmutableArray<A>, n: number): ImmutableArray<A> {
|
1059
|
+
const len = self.length;
|
1060
|
+
if (n === 0 || len <= 1 || len === Math.abs(n)) {
|
1061
|
+
return self;
|
1062
|
+
} else if (n < 0) {
|
1063
|
+
return self.rotate(len + n);
|
1064
|
+
} else {
|
1065
|
+
return self.slice(-n).concat(self.slice(0, len - n));
|
1066
|
+
}
|
1067
|
+
}
|
1068
|
+
|
1069
|
+
/**
|
1070
|
+
* @tsplus fluent fncts.ImmutableArray scanLeft
|
1071
|
+
*/
|
1072
|
+
export function scanLeft_<A, B>(self: ImmutableArray<A>, b: B, f: (b: B, a: A) => B): ImmutableArray<B> {
|
1073
|
+
const l = self.length;
|
1074
|
+
const r = Array(l + 1);
|
1075
|
+
r[0] = b;
|
1076
|
+
for (let i = 0; i < l; i++) {
|
1077
|
+
r[i + 1] = f(r[i]!, self._array[i]!);
|
1078
|
+
}
|
1079
|
+
return r.asImmutableArray;
|
1080
|
+
}
|
1081
|
+
|
1082
|
+
/**
|
1083
|
+
* @tsplus fluent fncts.ImmutableArray scanRight
|
1084
|
+
*/
|
1085
|
+
export function scanRight_<A, B>(self: ImmutableArray<A>, b: B, f: (a: A, b: B) => B): ImmutableArray<B> {
|
1086
|
+
const l = self.length;
|
1087
|
+
const r = Array(l + 1);
|
1088
|
+
r[l] = b;
|
1089
|
+
for (let i = l - 1; i >= 0; i--) {
|
1090
|
+
r[i] = f(self._array[i]!, r[i + 1]!);
|
1091
|
+
}
|
1092
|
+
return r.asImmutableArray;
|
1093
|
+
}
|
1094
|
+
|
1095
|
+
/**
|
1096
|
+
* @tsplus fluent fncts.ImmutableArray sort
|
1097
|
+
*/
|
1098
|
+
export function sort<A extends B, B>(self: ImmutableArray<A>, O: P.Ord<B>): ImmutableArray<A> {
|
1099
|
+
return self.isEmpty() || self.length === 1 ? self : self._array.slice().sort(O.compare_).asImmutableArray;
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
/**
|
1103
|
+
* @tsplus fluent fncts.ImmutableArray sortBy
|
1104
|
+
*/
|
1105
|
+
export function sortBy<A extends B, B>(self: ImmutableArray<A>, Os: ImmutableArray<P.Ord<B>>): ImmutableArray<A> {
|
1106
|
+
return self.sort(Os.fold(P.Ord.getMonoid()));
|
1107
|
+
}
|
1108
|
+
|
1109
|
+
/**
|
1110
|
+
* @tsplus fluent fncts.ImmutableArray spanLeft
|
1111
|
+
*/
|
1112
|
+
export function spanLeft_<A, B extends A>(
|
1113
|
+
self: ImmutableArray<A>,
|
1114
|
+
p: Refinement<A, B>,
|
1115
|
+
): readonly [ImmutableArray<B>, ImmutableArray<A>];
|
1116
|
+
export function spanLeft_<A>(self: ImmutableArray<A>, p: Predicate<A>): readonly [ImmutableArray<A>, ImmutableArray<A>];
|
1117
|
+
export function spanLeft_<A>(
|
1118
|
+
self: ImmutableArray<A>,
|
1119
|
+
p: Predicate<A>,
|
1120
|
+
): readonly [ImmutableArray<A>, ImmutableArray<A>] {
|
1121
|
+
const i = self.spanIndexLeft(p);
|
1122
|
+
const init = Array<A>(i);
|
1123
|
+
for (let j = 0; j < i; j++) {
|
1124
|
+
init[j] = self._array[j]!;
|
1125
|
+
}
|
1126
|
+
const l = self.length;
|
1127
|
+
const rest = Array<A>(l - i);
|
1128
|
+
for (let j = i; j < l; j++) {
|
1129
|
+
rest[j - i] = self._array[j]!;
|
1130
|
+
}
|
1131
|
+
return [init.asImmutableArray, rest.asImmutableArray];
|
1132
|
+
}
|
1133
|
+
|
1134
|
+
/**
|
1135
|
+
* @tsplus fluent fncts.ImmutableArray spanRight
|
1136
|
+
*/
|
1137
|
+
export function spanRight_<A, B extends A>(
|
1138
|
+
self: ImmutableArray<A>,
|
1139
|
+
p: Refinement<A, B>,
|
1140
|
+
): readonly [ImmutableArray<A>, ImmutableArray<B>];
|
1141
|
+
export function spanRight_<A>(
|
1142
|
+
self: ImmutableArray<A>,
|
1143
|
+
p: Predicate<A>,
|
1144
|
+
): readonly [ImmutableArray<A>, ImmutableArray<A>];
|
1145
|
+
export function spanRight_<A>(
|
1146
|
+
self: ImmutableArray<A>,
|
1147
|
+
p: Predicate<A>,
|
1148
|
+
): readonly [ImmutableArray<A>, ImmutableArray<A>] {
|
1149
|
+
const i = self.spanIndexRight(p);
|
1150
|
+
const l = self.length;
|
1151
|
+
const tail = Array<A>(l - i - 1);
|
1152
|
+
for (let j = l - 1; j > i; j--) {
|
1153
|
+
tail[j - i - 1] = self._array[j]!;
|
1154
|
+
}
|
1155
|
+
const rest = Array<A>(i);
|
1156
|
+
for (let j = i; j >= 0; j--) {
|
1157
|
+
rest[j] = self._array[j]!;
|
1158
|
+
}
|
1159
|
+
return [rest.asImmutableArray, tail.asImmutableArray];
|
1160
|
+
}
|
1161
|
+
|
1162
|
+
/**
|
1163
|
+
* @tsplus fluent fncts.ImmutableArray spanIndexLeft
|
1164
|
+
*/
|
1165
|
+
export function spanIndexLeft_<A>(self: ImmutableArray<A>, p: Predicate<A>): number {
|
1166
|
+
const l = self.length;
|
1167
|
+
let i = 0;
|
1168
|
+
for (; i < l; i++) {
|
1169
|
+
if (!p(self._array[i]!)) {
|
1170
|
+
break;
|
1171
|
+
}
|
1172
|
+
}
|
1173
|
+
return i;
|
1174
|
+
}
|
1175
|
+
|
1176
|
+
/**
|
1177
|
+
* @tsplus fluent fncts.ImmutableArray spanIndexRight
|
1178
|
+
*/
|
1179
|
+
export function spanIndexRight_<A>(as: ImmutableArray<A>, predicate: Predicate<A>): number {
|
1180
|
+
let i = as.length - 1;
|
1181
|
+
for (; i >= 0; i--) {
|
1182
|
+
if (!predicate(as._array[i]!)) {
|
1183
|
+
break;
|
1184
|
+
}
|
1185
|
+
}
|
1186
|
+
return i;
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
/**
|
1190
|
+
* @tsplus fluent fncts.ImmutableArray slice
|
1191
|
+
*/
|
1192
|
+
export function slice_<A>(self: ImmutableArray<A>, start?: number, end?: number): ImmutableArray<A> {
|
1193
|
+
return self._array.slice(start, end).asImmutableArray;
|
1194
|
+
}
|
1195
|
+
|
1196
|
+
/**
|
1197
|
+
* @tsplus fluent fncts.ImmutableArray splitAt
|
1198
|
+
*/
|
1199
|
+
export function splitAt_<A>(as: ImmutableArray<A>, n: number): readonly [ImmutableArray<A>, ImmutableArray<A>] {
|
1200
|
+
return [as.slice(0, n), as.slice(n)];
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
/**
|
1204
|
+
* @tsplus fluent fncts.ImmutableArray splitWhere
|
1205
|
+
*/
|
1206
|
+
export function splitWhere_<A>(
|
1207
|
+
self: ImmutableArray<A>,
|
1208
|
+
p: Predicate<A>,
|
1209
|
+
): readonly [ImmutableArray<A>, ImmutableArray<A>] {
|
1210
|
+
let cont = true;
|
1211
|
+
let i = 0;
|
1212
|
+
while (cont && i < self.length) {
|
1213
|
+
if (p(self._array[i]!)) {
|
1214
|
+
cont = false;
|
1215
|
+
} else {
|
1216
|
+
i++;
|
1217
|
+
}
|
1218
|
+
}
|
1219
|
+
return self.splitAt(i);
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
export const sequence: P.sequence<ImmutableArrayF> = (A) => (self) => self.traverse(A)(identity);
|
1223
|
+
|
1224
|
+
/**
|
1225
|
+
* @tsplus getter fncts.ImmutableArray sequence
|
1226
|
+
*/
|
1227
|
+
export const sequenceSelf: P.sequenceSelf<ImmutableArrayF> = (self) => (A) =>
|
1228
|
+
unsafeCoerce(self.traverse(A)(unsafeCoerce(identity)));
|
1229
|
+
|
1230
|
+
/**
|
1231
|
+
* @tsplus getter fncts.ImmutableArray tail
|
1232
|
+
*/
|
1233
|
+
export function tail<A>(self: ImmutableArray<A>): Maybe<ImmutableArray<A>> {
|
1234
|
+
return self.isNonEmpty() ? Just(self.slice(1)) : Nothing();
|
1235
|
+
}
|
1236
|
+
|
1237
|
+
/**
|
1238
|
+
* @tsplus fluent fncts.ImmutableArray take
|
1239
|
+
*/
|
1240
|
+
export function take_<A>(self: ImmutableArray<A>, n: number): ImmutableArray<A> {
|
1241
|
+
return self.slice(0, n);
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
/**
|
1245
|
+
* @tsplus fluent fncts.ImmutableArray takeLast
|
1246
|
+
*/
|
1247
|
+
export function takeLast_<A>(as: ImmutableArray<A>, n: number): ImmutableArray<A> {
|
1248
|
+
return isEmpty(as) ? ImmutableArray.empty() : as.slice(-n);
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
/**
|
1252
|
+
* @tsplus fluent fncts.ImmutableArray takeWhile
|
1253
|
+
*/
|
1254
|
+
export function takeWhile_<A, B extends A>(self: ImmutableArray<A>, p: Refinement<A, B>): ImmutableArray<B>;
|
1255
|
+
export function takeWhile_<A>(self: ImmutableArray<A>, p: Predicate<A>): ImmutableArray<A>;
|
1256
|
+
export function takeWhile_<A>(self: ImmutableArray<A>, p: Predicate<A>): ImmutableArray<A> {
|
1257
|
+
const i = self.spanIndexLeft(p);
|
1258
|
+
const init = Array<A>(i);
|
1259
|
+
for (let j = 0; j < i; j++) {
|
1260
|
+
init[j] = self._array[j]!;
|
1261
|
+
}
|
1262
|
+
return init.asImmutableArray;
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
export const traverseWithIndex_: P.traverseWithIndex_<ImmutableArrayF> = P.mkTraverseWithIndex_<ImmutableArrayF>()(
|
1266
|
+
(_) => (A) => (ta, f) =>
|
1267
|
+
ta.foldLeftWithIndex(A.pure(ImmutableArray.empty<typeof _.B>()), (i, fbs, a) =>
|
1268
|
+
A.zipWith_(fbs, f(i, a), (bs, b) => bs.append(b)),
|
1269
|
+
),
|
1270
|
+
);
|
1271
|
+
|
1272
|
+
/**
|
1273
|
+
* @tsplus dataFirst traverseWithIndex_
|
1274
|
+
*/
|
1275
|
+
export const traverseWithIndex: P.traverseWithIndex<ImmutableArrayF> = (A) => (f) => (self) =>
|
1276
|
+
traverseWithIndex_(A)(self, f);
|
1277
|
+
|
1278
|
+
/**
|
1279
|
+
* @tsplus getter fncts.ImmutableArray traverseWithIndex
|
1280
|
+
*/
|
1281
|
+
export const traverseWithIndexSelf: P.traverseWithIndexSelf<ImmutableArrayF> = (self) => (A) => (f) =>
|
1282
|
+
traverseWithIndex_(A)(self, f);
|
1283
|
+
|
1284
|
+
export const traverse_: P.traverse_<ImmutableArrayF> = (A) => (self, f) => self.traverseWithIndex(A)((_, a) => f(a));
|
1285
|
+
|
1286
|
+
/**
|
1287
|
+
* @tsplus dataFirst traverse_
|
1288
|
+
*/
|
1289
|
+
export const traverse: P.traverse<ImmutableArrayF> = (A) => (f) => (self) => self.traverseWithIndex(A)((_, a) => f(a));
|
1290
|
+
|
1291
|
+
/**
|
1292
|
+
* @tsplus getter fncts.ImmutableArray traverse
|
1293
|
+
*/
|
1294
|
+
export const traverseSelf: P.traverseSelf<ImmutableArrayF> = (self) => (A) => (f) =>
|
1295
|
+
self.traverseWithIndex(A)((_, a) => f(a));
|
1296
|
+
|
1297
|
+
export function union_<A>(E: P.Eq<A>) {
|
1298
|
+
const elemE = elem_(E);
|
1299
|
+
return (self: ImmutableArray<A>, that: ImmutableArray<A>): ImmutableArray<A> =>
|
1300
|
+
self.concat(that.filter((a) => !elemE(self, a)));
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
export function uniq<A>(E: P.Eq<A>) {
|
1304
|
+
return (self: ImmutableArray<A>): ImmutableArray<A> => {
|
1305
|
+
if (self.length === 1) {
|
1306
|
+
return self;
|
1307
|
+
}
|
1308
|
+
const elemE_ = elem_(E);
|
1309
|
+
const out = [] as Array<A>;
|
1310
|
+
const len = self.length;
|
1311
|
+
for (let i = 0; i < len; i++) {
|
1312
|
+
const a = self._array[i]!;
|
1313
|
+
if (!elemE_(out.asImmutableArray, a)) {
|
1314
|
+
out.push(a);
|
1315
|
+
}
|
1316
|
+
}
|
1317
|
+
return out.asImmutableArray;
|
1318
|
+
};
|
1319
|
+
}
|
1320
|
+
|
1321
|
+
/**
|
1322
|
+
* @tsplus fluent fncts.ImmutableArray uniq
|
1323
|
+
*/
|
1324
|
+
export function uniqSelf<A>(self: ImmutableArray<A>, E: P.Eq<A>): ImmutableArray<A> {
|
1325
|
+
return uniq(E)(self);
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
/**
|
1329
|
+
* @tsplus getter fncts.ImmutableArray unprepend
|
1330
|
+
*/
|
1331
|
+
export function unprepend<A>(self: ImmutableArray<A>): Maybe<readonly [A, ImmutableArray<A>]> {
|
1332
|
+
return self.isNonEmpty() ? Just([self[0]!, self.slice(1)]) : Nothing();
|
1333
|
+
}
|
1334
|
+
|
1335
|
+
/**
|
1336
|
+
* @tsplus index fncts.ImmutableArray
|
1337
|
+
*/
|
1338
|
+
export function unsafeGet<A>(self: ImmutableArray<A>, i: number): A | undefined {
|
1339
|
+
return self._array[i];
|
1340
|
+
}
|
1341
|
+
|
1342
|
+
/**
|
1343
|
+
* @tsplus getter fncts.ImmutableArray unsafeAsMutable
|
1344
|
+
*/
|
1345
|
+
export function unsafeAsMutable<A>(self: ImmutableArray<A>): Array<A> {
|
1346
|
+
return self._array as Array<A>;
|
1347
|
+
}
|
1348
|
+
|
1349
|
+
/**
|
1350
|
+
* @tsplus fluent fncts.ImmutableArray unsafeDeleteAt
|
1351
|
+
*/
|
1352
|
+
export function unsafeDeleteAt_<A>(self: ImmutableArray<A>, i: number): ImmutableArray<A> {
|
1353
|
+
return self.mutate((xs) => {
|
1354
|
+
xs.splice(i, 1);
|
1355
|
+
});
|
1356
|
+
}
|
1357
|
+
|
1358
|
+
/**
|
1359
|
+
* @tsplus fluent fncts.ImmutableArray unsafeInsertAt
|
1360
|
+
*/
|
1361
|
+
export function unsafeInsertAt_<A>(as: ImmutableArray<A>, i: number, a: A): ImmutableNonEmptyArray<A> {
|
1362
|
+
return as.mutate((xs) => {
|
1363
|
+
xs.splice(i, 0, a);
|
1364
|
+
}) as unknown as ImmutableNonEmptyArray<A>;
|
1365
|
+
}
|
1366
|
+
|
1367
|
+
/**
|
1368
|
+
* @tsplus fluent fncts.ImmutableArray unsafeModifyAt
|
1369
|
+
*/
|
1370
|
+
export function unsafeModifyAt_<A>(as: ImmutableArray<A>, i: number, f: (a: A) => A): ImmutableArray<A> {
|
1371
|
+
const next = f(as[i]!);
|
1372
|
+
if (as[i] === next) {
|
1373
|
+
return as;
|
1374
|
+
}
|
1375
|
+
return as.mutate((xs) => {
|
1376
|
+
xs[i] = next;
|
1377
|
+
});
|
1378
|
+
}
|
1379
|
+
|
1380
|
+
/**
|
1381
|
+
* @tsplus fluent fncts.ImmutableArray unsafeUpdateAt
|
1382
|
+
*/
|
1383
|
+
export function unsafeUpdateAt_<A>(as: ImmutableArray<A>, i: number, a: A): ImmutableArray<A> {
|
1384
|
+
if (as[i] === a) {
|
1385
|
+
return as;
|
1386
|
+
} else {
|
1387
|
+
return as.mutate((xs) => {
|
1388
|
+
xs[i] = a;
|
1389
|
+
});
|
1390
|
+
}
|
1391
|
+
}
|
1392
|
+
|
1393
|
+
/**
|
1394
|
+
* @tsplus getter fncts.ImmutableArray unzip
|
1395
|
+
*/
|
1396
|
+
export function unzip<A, B>(self: ImmutableArray<readonly [A, B]>): readonly [ImmutableArray<A>, ImmutableArray<B>] {
|
1397
|
+
const fa = Array<A>(self.length);
|
1398
|
+
const fb = Array<B>(self.length);
|
1399
|
+
|
1400
|
+
for (let i = 0; i < self.length; i++) {
|
1401
|
+
fa[i] = self._array[i]![0]!;
|
1402
|
+
fb[i] = self._array[i]![1]!;
|
1403
|
+
}
|
1404
|
+
|
1405
|
+
return [fa.asImmutableArray, fb.asImmutableArray];
|
1406
|
+
}
|
1407
|
+
|
1408
|
+
/**
|
1409
|
+
* @tsplus fluent fncts.ImmutableArray updateAt
|
1410
|
+
*/
|
1411
|
+
export function updateAt_<A>(as: ImmutableArray<A>, i: number, a: A): Maybe<ImmutableArray<A>> {
|
1412
|
+
return as.isOutOfBound(i) ? Nothing() : Just(as.unsafeUpdateAt(i, a));
|
1413
|
+
}
|
1414
|
+
|
1415
|
+
export const wilt_: P.wilt_<ImmutableArrayF> = (A) => (self, f) => self.wiltWithIndex(A)((_, a) => f(a));
|
1416
|
+
|
1417
|
+
/**
|
1418
|
+
* @tsplus pipeable fncts.ImmutableArray wilt_
|
1419
|
+
*/
|
1420
|
+
export const wilt: P.wilt<ImmutableArrayF> = (A) => (f) => (self) => self.wiltWithIndex(A)((_, a) => f(a));
|
1421
|
+
|
1422
|
+
/**
|
1423
|
+
* @tsplus fluent fncts.ImmutableArray wilt
|
1424
|
+
*/
|
1425
|
+
export const wiltSelf: P.wiltSelf<ImmutableArrayF> = (self) => (A) => (f) => self.wiltWithIndex(A)((_, a) => f(a));
|
1426
|
+
|
1427
|
+
export const wiltWithIndex_: P.wiltWithIndex_<ImmutableArrayF> = P.mkWiltWithIndex_<ImmutableArrayF>()(
|
1428
|
+
(_) => (A) => (self, f) =>
|
1429
|
+
A.map_(
|
1430
|
+
self.foldLeftWithIndex(A.pure([[] as Array<typeof _.B>, [] as Array<typeof _.B2>] as const), (i, fbs, a) =>
|
1431
|
+
A.zipWith_(f(i, a), fbs, (eb, r) =>
|
1432
|
+
eb.match(
|
1433
|
+
(b1) => {
|
1434
|
+
r[0].push(b1);
|
1435
|
+
return r;
|
1436
|
+
},
|
1437
|
+
(b2) => {
|
1438
|
+
r[1].push(b2);
|
1439
|
+
return r;
|
1440
|
+
},
|
1441
|
+
),
|
1442
|
+
),
|
1443
|
+
),
|
1444
|
+
([b1s, b2s]) => [b1s.asImmutableArray, b2s.asImmutableArray],
|
1445
|
+
),
|
1446
|
+
);
|
1447
|
+
|
1448
|
+
/**
|
1449
|
+
* @tsplus dataFirst wiltWithIndex_
|
1450
|
+
*/
|
1451
|
+
export const wiltWithIndex: P.wiltWithIndex<ImmutableArrayF> = (A) => (f) => (self) => wiltWithIndex_(A)(self, f);
|
1452
|
+
|
1453
|
+
/**
|
1454
|
+
* @tsplus getter fncts.ImmutableArray wiltWithIndex
|
1455
|
+
*/
|
1456
|
+
export const wiltWithIndexSelf: P.wiltWithIndexSelf<ImmutableArrayF> = (self) => (A) => (f) =>
|
1457
|
+
wiltWithIndex_(A)(self, f);
|
1458
|
+
|
1459
|
+
export const wither_: P.wither_<ImmutableArrayF> = (A) => (self, f) => witherWithIndex_(A)(self, (_, a) => f(a));
|
1460
|
+
|
1461
|
+
/**
|
1462
|
+
* @tsplus dataFirst wither_
|
1463
|
+
*/
|
1464
|
+
export const wither: P.wither<ImmutableArrayF> = (A) => (f) => (self) => wither_(A)(self, f);
|
1465
|
+
|
1466
|
+
/**
|
1467
|
+
* @tsplus fluent fncts.ImmutableArray wither
|
1468
|
+
*/
|
1469
|
+
export const witherSelf: P.witherSelf<ImmutableArrayF> = (self) => (A) => (f) =>
|
1470
|
+
witherWithIndex_(A)(self, (_, a) => f(a));
|
1471
|
+
|
1472
|
+
export const witherWithIndex_: P.witherWithIndex_<ImmutableArrayF> = P.mkWitherWithIndex_<ImmutableArrayF>()(
|
1473
|
+
(_) => (A) => (self, f) =>
|
1474
|
+
A.map_(
|
1475
|
+
self.foldLeftWithIndex(A.pure([] as Array<typeof _.B>), (i, b, a) =>
|
1476
|
+
A.zipWith_(f(i, a), b, (maybeB, bs) => {
|
1477
|
+
if (maybeB.isJust()) {
|
1478
|
+
bs.push(maybeB.value);
|
1479
|
+
}
|
1480
|
+
return bs;
|
1481
|
+
}),
|
1482
|
+
),
|
1483
|
+
(bs) => bs.asImmutableArray,
|
1484
|
+
),
|
1485
|
+
);
|
1486
|
+
|
1487
|
+
/**
|
1488
|
+
* @tsplus dataFirst witherWithIndex_
|
1489
|
+
*/
|
1490
|
+
export const witherWithIndex: P.witherWithIndex<ImmutableArrayF> = (A) => (f) => (self) => witherWithIndex_(A)(self, f);
|
1491
|
+
|
1492
|
+
/**
|
1493
|
+
* @tsplus fluent fncts.ImmutableArray witherWithIndex
|
1494
|
+
*/
|
1495
|
+
export const witherWithIndexSelf: P.witherWithIndexSelf<ImmutableArrayF> = (self) => (A) => (f) =>
|
1496
|
+
witherWithIndex_(A)(self, f);
|
1497
|
+
|
1498
|
+
/**
|
1499
|
+
* @tsplus fluent fncts.ImmutableArray zip
|
1500
|
+
*/
|
1501
|
+
export function zip_<A, B>(self: ImmutableArray<A>, that: ImmutableArray<B>): ImmutableArray<readonly [A, B]> {
|
1502
|
+
return self.zipWith(that, tuple);
|
1503
|
+
}
|
1504
|
+
|
1505
|
+
/**
|
1506
|
+
* @tsplus fluent fncts.ImmutableArray zipWith
|
1507
|
+
*/
|
1508
|
+
export function zipWith_<A, B, C>(
|
1509
|
+
self: ImmutableArray<A>,
|
1510
|
+
fb: ImmutableArray<B>,
|
1511
|
+
f: (a: A, b: B) => C,
|
1512
|
+
): ImmutableArray<C> {
|
1513
|
+
const len = Math.min(self.length, fb.length);
|
1514
|
+
const fc = Array<C>(len);
|
1515
|
+
for (let i = 0; i < len; i++) {
|
1516
|
+
fc[i] = f(self._array[i]!, fb._array[i]!);
|
1517
|
+
}
|
1518
|
+
return fc.asImmutableArray;
|
1519
|
+
}
|