functype 0.8.35 → 0.8.36

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.
Files changed (84) hide show
  1. package/README.md +43 -43
  2. package/dist/chunk-4H62YQ42.mjs +0 -0
  3. package/dist/chunk-5NZRFQ7O.mjs +1 -0
  4. package/dist/chunk-OTZ4XGNK.js +1 -0
  5. package/dist/chunk-WTWWDZY6.js +1 -0
  6. package/dist/collections/index.d.mts +1 -1
  7. package/dist/collections/index.d.ts +1 -1
  8. package/dist/core/task/Task.d.mts +1 -1
  9. package/dist/core/task/Task.d.ts +1 -1
  10. package/dist/core/task/Task.js +1 -1
  11. package/dist/core/task/Task.mjs +1 -1
  12. package/dist/either/Either.d.mts +1 -1
  13. package/dist/either/Either.d.ts +1 -1
  14. package/dist/either/Either.js +1 -1
  15. package/dist/either/Either.mjs +1 -1
  16. package/dist/{index-B6k3GVAd.d.ts → index-Bvqg1Srg.d.ts} +47 -55
  17. package/dist/{index-Cwkc_dEO.d.mts → index-D6OHxaFT.d.mts} +47 -55
  18. package/dist/index.d.mts +2 -2
  19. package/dist/index.d.ts +2 -2
  20. package/dist/index.js +1 -1
  21. package/dist/index.mjs +1 -1
  22. package/dist/iterable/index.d.mts +1 -1
  23. package/dist/iterable/index.d.ts +1 -1
  24. package/dist/iterable/index.js +1 -1
  25. package/dist/iterable/index.mjs +1 -1
  26. package/dist/list/List.d.mts +1 -1
  27. package/dist/list/List.d.ts +1 -1
  28. package/dist/list/List.js +1 -1
  29. package/dist/list/List.mjs +1 -1
  30. package/dist/map/Map.d.mts +1 -1
  31. package/dist/map/Map.d.ts +1 -1
  32. package/dist/map/Map.js +1 -1
  33. package/dist/map/Map.mjs +1 -1
  34. package/dist/option/Option.d.mts +1 -1
  35. package/dist/option/Option.d.ts +1 -1
  36. package/dist/option/Option.js +1 -1
  37. package/dist/option/Option.mjs +1 -1
  38. package/dist/set/Set.d.mts +1 -1
  39. package/dist/set/Set.d.ts +1 -1
  40. package/dist/set/Set.js +1 -1
  41. package/dist/set/Set.mjs +1 -1
  42. package/dist/try/Try.d.mts +1 -1
  43. package/dist/try/Try.d.ts +1 -1
  44. package/dist/try/Try.js +1 -1
  45. package/dist/try/Try.mjs +1 -1
  46. package/dist/typeable/Typeable.d.mts +5 -4
  47. package/dist/typeable/Typeable.d.ts +5 -4
  48. package/dist/util/index.d.mts +1 -1
  49. package/dist/util/index.d.ts +1 -1
  50. package/dist/util/index.js +1 -1
  51. package/dist/util/index.mjs +1 -1
  52. package/dist/util/isIterable.js +1 -1
  53. package/dist/util/isIterable.mjs +1 -1
  54. package/package.json +10 -10
  55. package/dist/chunk-52OPFRS2.js +0 -1
  56. package/dist/chunk-BNNK42JC.js +0 -1
  57. package/dist/chunk-QBAH7SOA.mjs +0 -1
  58. package/dist/chunk-RRAIFS3D.mjs +0 -1
  59. package/dist/iterable/Seq.d.mts +0 -8
  60. package/dist/iterable/Seq.d.ts +0 -8
  61. package/dist/iterable/Seq.js +0 -1
  62. package/dist/iterable/Seq.mjs +0 -1
  63. package/lib/TaskPromise.d.ts +0 -3
  64. package/lib/collections/index.d.ts +0 -8
  65. package/lib/either/Either.d.ts +0 -52
  66. package/lib/either/EitherT.d.ts +0 -9
  67. package/lib/error/ParseError.d.ts +0 -6
  68. package/lib/functor/index.d.ts +0 -15
  69. package/lib/identity/Identity.d.ts +0 -4
  70. package/lib/index.d.ts +0 -21
  71. package/lib/iterable/Seq.d.ts +0 -31
  72. package/lib/iterable/index.d.ts +0 -22
  73. package/lib/list/List.d.ts +0 -26
  74. package/lib/map/Map.d.ts +0 -17
  75. package/lib/map/shim.d.ts +0 -2
  76. package/lib/option/Option.d.ts +0 -30
  77. package/lib/serializable/Serializable.d.ts +0 -15
  78. package/lib/set/Set.d.ts +0 -15
  79. package/lib/set/shim.d.ts +0 -2
  80. package/lib/try/Try.d.ts +0 -18
  81. package/lib/tuple/Tuple.d.ts +0 -9
  82. package/lib/typeable/Typeable.d.ts +0 -4
  83. package/lib/util/index.d.ts +0 -3
  84. package/lib/util/isIterable.d.ts +0 -1
package/README.md CHANGED
@@ -1,43 +1,43 @@
1
- # functype
2
-
3
- A small functional library for TypeScript inspired by FP, Scala Standard Library, and ZIO
4
-
5
- ![NPM Version](https://img.shields.io/npm/v/functype?link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Ffunctype)
6
-
7
- [![Node.js Build](https://github.com/jordanburke/functype/actions/workflows/pnpm-build.yml/badge.svg)](https://github.com/jordanburke/functype/actions/workflows/pnpm-build.yml)
8
-
9
- # Functype - A Functional Library for TypeScript
10
-
11
- Functype is a functional programming library for TypeScript, inspired by FP, Scala's standard library and ZIO. It offers a collection of utilities and abstractions to facilitate functional programming paradigms within TypeScript applications. The library is designed to provide developers with tools that promote immutability, pure functions, and composability, aligning with functional programming principles.
12
-
13
- ## Key Features
14
-
15
- - **Functional Utilities:** Functype includes a variety of functions and combinators that assist in writing functional code, such as `map`, `filter`, and `reduce` operations tailored for TypeScript.
16
-
17
- - **Type Safety:** Leveraging TypeScript's type system, Functype ensures that functional operations are type-safe, reducing runtime errors and enhancing code reliability.
18
-
19
- - **Immutability Support:** The library emphasizes immutable data structures, encouraging developers to write predictable and side-effect-free code.
20
-
21
- - **Type Orientation:** Functype encourages TypeScript developers to adopt functional programming principles through type annotations and type inference.
22
-
23
- - **Composability:** Functype provides a collection of abstractions and utilities for composing complex functional programs.
24
-
25
- ## Installation
26
-
27
- You can install `functype` using any package manager:
28
-
29
- ```bash
30
- npm install functype
31
- ```
32
-
33
- ```bash
34
- pnpm install functype
35
- ```
36
-
37
- ```bash
38
- yarn install functype
39
- ```
40
-
41
- ```bash
42
- bun install functype
43
- ```
1
+ # functype
2
+
3
+ A small functional library for TypeScript inspired by FP, Scala Standard Library, and ZIO
4
+
5
+ ![NPM Version](https://img.shields.io/npm/v/functype?link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Ffunctype)
6
+
7
+ [![Node.js Build](https://github.com/jordanburke/functype/actions/workflows/pnpm-build.yml/badge.svg)](https://github.com/jordanburke/functype/actions/workflows/pnpm-build.yml)
8
+
9
+ # Functype - A Functional Library for TypeScript
10
+
11
+ Functype is a functional programming library for TypeScript, inspired by FP, Scala's standard library and ZIO. It offers a collection of utilities and abstractions to facilitate functional programming paradigms within TypeScript applications. The library is designed to provide developers with tools that promote immutability, pure functions, and composability, aligning with functional programming principles.
12
+
13
+ ## Key Features
14
+
15
+ - **Functional Utilities:** Functype includes a variety of functions and combinators that assist in writing functional code, such as `map`, `filter`, and `reduce` operations tailored for TypeScript.
16
+
17
+ - **Type Safety:** Leveraging TypeScript's type system, Functype ensures that functional operations are type-safe, reducing runtime errors and enhancing code reliability.
18
+
19
+ - **Immutability Support:** The library emphasizes immutable data structures, encouraging developers to write predictable and side-effect-free code.
20
+
21
+ - **Type Orientation:** Functype encourages TypeScript developers to adopt functional programming principles through type annotations and type inference.
22
+
23
+ - **Composability:** Functype provides a collection of abstractions and utilities for composing complex functional programs.
24
+
25
+ ## Installation
26
+
27
+ You can install `functype` using any package manager:
28
+
29
+ ```bash
30
+ npm install functype
31
+ ```
32
+
33
+ ```bash
34
+ pnpm install functype
35
+ ```
36
+
37
+ ```bash
38
+ yarn install functype
39
+ ```
40
+
41
+ ```bash
42
+ bun install functype
43
+ ```
File without changes
@@ -0,0 +1 @@
1
+ import{a as g}from"./chunk-JF5YGNCO.mjs";import{a as v}from"./chunk-HD6YYUHO.mjs";import{a as R}from"./chunk-377WQNCB.mjs";import{a as U}from"./chunk-HA5XD5KC.mjs";import{a as B}from"./chunk-2I2NKDFN.mjs";import Q from"safe-stable-stringify";import S from"safe-stable-stringify";import j from"safe-stable-stringify";var c=e=>{let t=new U(e),r=l(t),o={...r,add:a=>c([...t,a]),remove:a=>{let L=new U(t);return L.delete(a),c(L)},contains:a=>t.has(a),has:a=>t.has(a),map:a=>c(r.map(a)),flatMap:a=>c(r.flatMap(a)),toList:()=>l(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},h=e=>c(e);var T=e=>{let t=Array.from(e||[]),r={_tag:"List",[Symbol.iterator]:()=>t[Symbol.iterator](),get size(){return t.length},get length(){return t.length},map:o=>T(t.map(o)),flatMap:o=>T(t.flatMap(a=>Array.from(o(a)))),forEach:o=>t.forEach(o),count:o=>t.filter(o).length,exists:o=>t.some(o),filter:o=>T(t.filter(o)),filterNot:o=>T(t.filter(a=>!o(a))),find:o=>u(t.find(o)),get head(){return t[0]},get headOption(){return t.length>0?u(t[0]):d()},get isEmpty(){return t.length===0},toArray:()=>[...t],reduce:o=>t.reduce(o),reduceRight:o=>t.reduceRight(o),foldLeft:o=>a=>t.reduce(a,o),foldRight:o=>a=>t.reduceRight((L,x)=>a(x,L),o),remove:o=>T(t.filter(a=>a!==o)),removeAt:o=>T(t.slice(0,o).concat(t.slice(o+1))),add:o=>T([...t,o]),get:o=>u(t[o]),concat:o=>T([...t,...o.toArray()]),drop:o=>T(t.slice(o)),dropRight:o=>T(t.slice(0,-o)),dropWhile:o=>T(t.slice(t.findIndex(a=>!o(a)))),flatten:()=>T(t.flatMap(o=>Array.isArray(o)?o:[o])),toList:()=>r,toSet:()=>h(t),toString:()=>`List(${j(t)})`,toValue:()=>({_tag:"List",value:t})};return r},l=e=>T(e);var V=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>i(t(e)),mapAsync:t=>t(e).then(r=>i(r)).catch(r=>Promise.resolve(n(r))),merge:t=>t.isLeft()?n(t.value):i([e,t.value]),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>n(r)),toOption:()=>y(e),toList:()=>l([e]),toString:()=>`Right(${S(e)})`,[Symbol.iterator]:function*(){yield e},yield:function*(){yield e},traverse:t=>{let r=t(e);return r.isLeft()?n(r.value):i([r.value])},lazyMap:function*(t){yield i(t(e))},tap:t=>(t(e),i(e)),tapLeft:t=>i(e),mapLeft:t=>i(e),bimap:(t,r)=>i(r(e)),fold:(t,r)=>r(e),swap:()=>n(e),then:(t,r)=>Promise.resolve(e).then(t,r)}),w=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>n(e),mapAsync:t=>Promise.resolve(n(e)),merge:t=>n(e),flatMap:t=>n(e),flatMapAsync:t=>Promise.resolve(n(e)),toOption:()=>d(),toList:()=>l(),toString:()=>`Left(${S(e)})`,[Symbol.iterator]:function*(){},yield:function*(){},traverse:t=>n(e),lazyMap:function*(t){yield n(e)},tap:t=>n(e),tapLeft:t=>(t(e),n(e)),mapLeft:t=>n(t(e)),bimap:(t,r)=>n(t(e)),fold:(t,r)=>t(e),swap:()=>i(e),then:(t,r)=>Promise.reject(e).then(null,r)}),i=e=>V(e),n=e=>w(e),Le=e=>e.isRight(),de=e=>e.isLeft(),ye=(e,t)=>{try{return i(e())}catch(r){return n(t(r))}},W=e=>V(e);console.assert(W);var D=e=>w(e);console.assert(D);var ce=async(e,t)=>{try{let r=await e();return i(r)}catch(r){return n(t(r))}},H={sequence:e=>{let t=[];for(let r of e){if(r.isLeft())return n(r.value);t.push(r.value)}return i(t)},traverse:(e,t)=>H.sequence(e.map(t)),fromNullable:(e,t)=>e==null?n(t):i(e),fromPredicate:(e,t,r)=>t(e)?i(e):n(r),ap:(e,t)=>e.flatMap(r=>t.map(r)),fromPromise:async(e,t)=>{try{let r=await e;return i(r)}catch(r){return n(t(r))}}};var E=(e,t)=>{let r=v(e,t);return{...g("AppException"),...n(r)}},A=e=>({...g("AppResult"),...i(e)});function O(e,t=r=>r){try{return A(e())}catch(r){return E(t(r))}}O.success=e=>A(e);O.fail=e=>E(e);async function K(e,t=r=>r){try{let r=await e();return A(r)}catch(r){let o=await t(r);return E(o)}}K.success=e=>A(e);K.fail=e=>E(e);var f=e=>{let t={values:new R(e)},r=()=>Array.from(t.values.entries()).map(([s,p])=>B([s,p])),o=s=>f(new R(t.values).set(s.toArray()[0],s.toArray()[1]).entries()),a=s=>{let p=new R(t.values);return p.delete(s)?f(p.entries()):f(t.values.entries())},L=s=>t.values.get(s[0])===s[1],x=()=>t.values.size,_=s=>f(Array.from(t.values.entries()).map(([p,G])=>[p,s(G)])),P=s=>{let p=f(t.values.entries()).toList();return f(p.flatMap(s).toArray())},I=s=>l(r()).reduce(s),N=s=>l(r()).reduceRight(s),z=s=>p=>l(r()).foldLeft(s)(p),F=s=>p=>l(r()).foldRight(s)(p),C=s=>u(t.values.get(s)),$=(s,p)=>u(t.values.get(s)).getOrElse(p),q=()=>t.values.size===0;return{add:o,remove:a,contains:L,get size(){return x()},map:_,flatMap:P,reduce:I,reduceRight:N,foldLeft:z,foldRight:F,get:C,getOrElse:$,get isEmpty(){return q()},orElse:(s,p)=>u(t.values.get(s)).orElse(p),toList:()=>l(r()),toSet:()=>h(r()),toString:()=>`Map(${r().toString()})`}},Ve=e=>f(e);import M from"safe-stable-stringify";var k=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>k(e),orThrow:t=>e,toEither:()=>i(e),map:t=>J(()=>t(e)),flatMap:t=>t(e),toString:()=>`Success(${M(e)})`}),b=e=>({_tag:"Failure",value:void 0,error:e,isSuccess:()=>!1,isFailure:()=>!0,get:()=>{throw e},getOrElse:t=>t,orElse:t=>t,orThrow:t=>{throw t},toEither:()=>n(e),map:t=>b(e),flatMap:t=>b(e),toString:()=>`Failure(${M(e)}))`}),J=e=>{try{return k(e())}catch(t){return b(t instanceof Error?t:new Error(String(t)))}};var y=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,getOrThrow:()=>e,orElse:()=>y(e),orNull:()=>e,map:t=>y(t(e)),filter(t){return t(e)?y(e):m},fold:(t,r)=>r(e),flatMap:t=>t(e),reduce:t=>t(void 0,e),reduceRight:t=>t(void 0,e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),toList:()=>l([e]),contains:t=>t===e,size:1,toEither:t=>i(e),toString:()=>`Some(${Q(e)})`,toValue:()=>({_tag:"Some",value:e})}),m={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,getOrThrow(e){throw e},orElse:e=>e,orNull:()=>null,map:e=>m,filter(e){return m},flatMap:e=>m,reduce:()=>{},reduceRight:()=>{},fold:(e,t)=>e(),foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>l([]),contains:()=>!1,size:0,toEither:e=>n(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0})},d=()=>m,u=e=>e!=null?y(e):d();u.from=e=>u(e);u.none=()=>d();export{y as a,d as b,u as c,h as d,l as e,i as f,n as g,Le as h,de as i,ye as j,W as k,D as l,ce as m,H as n,E as o,A as p,O as q,K as r,Ve as s,J as t};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkSQWNJC6Ojs = require('./chunk-SQWNJC6O.js');var _chunk2U34DUZUjs = require('./chunk-2U34DUZU.js');var _chunk5VTXJIR3js = require('./chunk-5VTXJIR3.js');var _chunk3VJERXBPjs = require('./chunk-3VJERXBP.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var _safestablestringify = require('safe-stable-stringify'); var _safestablestringify2 = _interopRequireDefault(_safestablestringify);var c=e=>{let t=new (0, _chunk3VJERXBPjs.a)(e),r=l(t),o={...r,add:a=>c([...t,a]),remove:a=>{let L=new (0, _chunk3VJERXBPjs.a)(t);return L.delete(a),c(L)},contains:a=>t.has(a),has:a=>t.has(a),map:a=>c(r.map(a)),flatMap:a=>c(r.flatMap(a)),toList:()=>l(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},h= exports.d =e=>c(e);var T=e=>{let t=Array.from(e||[]),r={_tag:"List",[Symbol.iterator]:()=>t[Symbol.iterator](),get size(){return t.length},get length(){return t.length},map:o=>T(t.map(o)),flatMap:o=>T(t.flatMap(a=>Array.from(o(a)))),forEach:o=>t.forEach(o),count:o=>t.filter(o).length,exists:o=>t.some(o),filter:o=>T(t.filter(o)),filterNot:o=>T(t.filter(a=>!o(a))),find:o=>u(t.find(o)),get head(){return t[0]},get headOption(){return t.length>0?u(t[0]):d()},get isEmpty(){return t.length===0},toArray:()=>[...t],reduce:o=>t.reduce(o),reduceRight:o=>t.reduceRight(o),foldLeft:o=>a=>t.reduce(a,o),foldRight:o=>a=>t.reduceRight((L,x)=>a(x,L),o),remove:o=>T(t.filter(a=>a!==o)),removeAt:o=>T(t.slice(0,o).concat(t.slice(o+1))),add:o=>T([...t,o]),get:o=>u(t[o]),concat:o=>T([...t,...o.toArray()]),drop:o=>T(t.slice(o)),dropRight:o=>T(t.slice(0,-o)),dropWhile:o=>T(t.slice(t.findIndex(a=>!o(a)))),flatten:()=>T(t.flatMap(o=>Array.isArray(o)?o:[o])),toList:()=>r,toSet:()=>h(t),toString:()=>`List(${_safestablestringify2.default.call(void 0, t)})`,toValue:()=>({_tag:"List",value:t})};return r},l= exports.e =e=>T(e);var V=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>i(t(e)),mapAsync:t=>t(e).then(r=>i(r)).catch(r=>Promise.resolve(n(r))),merge:t=>t.isLeft()?n(t.value):i([e,t.value]),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>n(r)),toOption:()=>y(e),toList:()=>l([e]),toString:()=>`Right(${_safestablestringify2.default.call(void 0, e)})`,[Symbol.iterator]:function*(){yield e},yield:function*(){yield e},traverse:t=>{let r=t(e);return r.isLeft()?n(r.value):i([r.value])},lazyMap:function*(t){yield i(t(e))},tap:t=>(t(e),i(e)),tapLeft:t=>i(e),mapLeft:t=>i(e),bimap:(t,r)=>i(r(e)),fold:(t,r)=>r(e),swap:()=>n(e),then:(t,r)=>Promise.resolve(e).then(t,r)}),w=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>n(e),mapAsync:t=>Promise.resolve(n(e)),merge:t=>n(e),flatMap:t=>n(e),flatMapAsync:t=>Promise.resolve(n(e)),toOption:()=>d(),toList:()=>l(),toString:()=>`Left(${_safestablestringify2.default.call(void 0, e)})`,[Symbol.iterator]:function*(){},yield:function*(){},traverse:t=>n(e),lazyMap:function*(t){yield n(e)},tap:t=>n(e),tapLeft:t=>(t(e),n(e)),mapLeft:t=>n(t(e)),bimap:(t,r)=>n(t(e)),fold:(t,r)=>t(e),swap:()=>i(e),then:(t,r)=>Promise.reject(e).then(null,r)}),i= exports.f =e=>V(e),n= exports.g =e=>w(e),Le= exports.h =e=>e.isRight(),de= exports.i =e=>e.isLeft(),ye= exports.j =(e,t)=>{try{return i(e())}catch(r){return n(t(r))}},W= exports.k =e=>V(e);console.assert(W);var D=e=>w(e);console.assert(D);var ce=async(e,t)=>{try{let r=await e();return i(r)}catch(r){return n(t(r))}},H= exports.n ={sequence:e=>{let t=[];for(let r of e){if(r.isLeft())return n(r.value);t.push(r.value)}return i(t)},traverse:(e,t)=>H.sequence(e.map(t)),fromNullable:(e,t)=>e==null?n(t):i(e),fromPredicate:(e,t,r)=>t(e)?i(e):n(r),ap:(e,t)=>e.flatMap(r=>t.map(r)),fromPromise:async(e,t)=>{try{let r=await e;return i(r)}catch(r){return n(t(r))}}};var E=(e,t)=>{let r=_chunk2U34DUZUjs.a.call(void 0, e,t);return{..._chunkSQWNJC6Ojs.a.call(void 0, "AppException"),...n(r)}},A= exports.p =e=>({..._chunkSQWNJC6Ojs.a.call(void 0, "AppResult"),...i(e)});function O(e,t=r=>r){try{return A(e())}catch(r){return E(t(r))}}O.success=e=>A(e);O.fail=e=>E(e);async function K(e,t=r=>r){try{let r=await e();return A(r)}catch(r){let o=await t(r);return E(o)}}K.success=e=>A(e);K.fail=e=>E(e);var f=e=>{let t={values:new (0, _chunk5VTXJIR3js.a)(e)},r=()=>Array.from(t.values.entries()).map(([s,p])=>_chunkOXLZ6UIZjs.a.call(void 0, [s,p])),o=s=>f(new (0, _chunk5VTXJIR3js.a)(t.values).set(s.toArray()[0],s.toArray()[1]).entries()),a=s=>{let p=new (0, _chunk5VTXJIR3js.a)(t.values);return p.delete(s)?f(p.entries()):f(t.values.entries())},L=s=>t.values.get(s[0])===s[1],x=()=>t.values.size,_=s=>f(Array.from(t.values.entries()).map(([p,G])=>[p,s(G)])),P=s=>{let p=f(t.values.entries()).toList();return f(p.flatMap(s).toArray())},I=s=>l(r()).reduce(s),N=s=>l(r()).reduceRight(s),z=s=>p=>l(r()).foldLeft(s)(p),F=s=>p=>l(r()).foldRight(s)(p),C=s=>u(t.values.get(s)),$=(s,p)=>u(t.values.get(s)).getOrElse(p),q=()=>t.values.size===0;return{add:o,remove:a,contains:L,get size(){return x()},map:_,flatMap:P,reduce:I,reduceRight:N,foldLeft:z,foldRight:F,get:C,getOrElse:$,get isEmpty(){return q()},orElse:(s,p)=>u(t.values.get(s)).orElse(p),toList:()=>l(r()),toSet:()=>h(r()),toString:()=>`Map(${r().toString()})`}},Ve= exports.s =e=>f(e);var k=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>k(e),orThrow:t=>e,toEither:()=>i(e),map:t=>J(()=>t(e)),flatMap:t=>t(e),toString:()=>`Success(${_safestablestringify2.default.call(void 0, e)})`}),b=e=>({_tag:"Failure",value:void 0,error:e,isSuccess:()=>!1,isFailure:()=>!0,get:()=>{throw e},getOrElse:t=>t,orElse:t=>t,orThrow:t=>{throw t},toEither:()=>n(e),map:t=>b(e),flatMap:t=>b(e),toString:()=>`Failure(${_safestablestringify2.default.call(void 0, e)}))`}),J= exports.t =e=>{try{return k(e())}catch(t){return b(t instanceof Error?t:new Error(String(t)))}};var y=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,getOrThrow:()=>e,orElse:()=>y(e),orNull:()=>e,map:t=>y(t(e)),filter(t){return t(e)?y(e):m},fold:(t,r)=>r(e),flatMap:t=>t(e),reduce:t=>t(void 0,e),reduceRight:t=>t(void 0,e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),toList:()=>l([e]),contains:t=>t===e,size:1,toEither:t=>i(e),toString:()=>`Some(${_safestablestringify2.default.call(void 0, e)})`,toValue:()=>({_tag:"Some",value:e})}),m={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,getOrThrow(e){throw e},orElse:e=>e,orNull:()=>null,map:e=>m,filter(e){return m},flatMap:e=>m,reduce:()=>{},reduceRight:()=>{},fold:(e,t)=>e(),foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>l([]),contains:()=>!1,size:0,toEither:e=>n(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0})},d= exports.b =()=>m,u= exports.c =e=>e!=null?y(e):d();u.from=e=>u(e);u.none=()=>d();exports.a = y; exports.b = d; exports.c = u; exports.d = h; exports.e = l; exports.f = i; exports.g = n; exports.h = Le; exports.i = de; exports.j = ye; exports.k = W; exports.l = D; exports.m = ce; exports.n = H; exports.o = E; exports.p = A; exports.q = O; exports.r = K; exports.s = Ve; exports.t = J;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1,4 +1,4 @@
1
- export { d as Collection, C as Converters } from '../index-Cwkc_dEO.mjs';
1
+ export { a as Collection, C as Converters } from '../index-D6OHxaFT.mjs';
2
2
  import '../functor/index.mjs';
3
3
  import '../core/base/Base.mjs';
4
4
  import '../core/error/Throwable.mjs';
@@ -1,4 +1,4 @@
1
- export { d as Collection, C as Converters } from '../index-B6k3GVAd.js';
1
+ export { a as Collection, C as Converters } from '../index-Bvqg1Srg.js';
2
2
  import '../functor/index.js';
3
3
  import '../core/base/Base.js';
4
4
  import '../core/error/Throwable.js';
@@ -1,4 +1,4 @@
1
- export { A as AppException, l as AppResult, n as AsyncTask, m as Task } from '../../index-Cwkc_dEO.mjs';
1
+ export { A as AppException, h as AppResult, k as AsyncTask, j as Task } from '../../index-D6OHxaFT.mjs';
2
2
  import '../error/Throwable.mjs';
3
3
  import '../../functor/index.mjs';
4
4
  import '../base/Base.mjs';
@@ -1,4 +1,4 @@
1
- export { A as AppException, l as AppResult, n as AsyncTask, m as Task } from '../../index-B6k3GVAd.js';
1
+ export { A as AppException, h as AppResult, k as AsyncTask, j as Task } from '../../index-Bvqg1Srg.js';
2
2
  import '../error/Throwable.js';
3
3
  import '../../functor/index.js';
4
4
  import '../base/Base.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk52OPFRS2js = require('../../chunk-52OPFRS2.js');require('../../chunk-OXLZ6UIZ.js');require('../../chunk-BNNK42JC.js');require('../../chunk-2U34DUZU.js');require('../../chunk-SQWNJC6O.js');require('../../chunk-5O6YELD3.js');require('../../chunk-5VTXJIR3.js');require('../../chunk-3VJERXBP.js');require('../../chunk-XORABVON.js');require('../../chunk-K3EKBPQE.js');exports.AppException = _chunk52OPFRS2js.r; exports.AppResult = _chunk52OPFRS2js.s; exports.AsyncTask = _chunk52OPFRS2js.u; exports.Task = _chunk52OPFRS2js.t;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOTZ4XGNKjs = require('../../chunk-OTZ4XGNK.js');require('../../chunk-SQWNJC6O.js');require('../../chunk-5O6YELD3.js');require('../../chunk-2U34DUZU.js');require('../../chunk-5VTXJIR3.js');require('../../chunk-3VJERXBP.js');require('../../chunk-OXLZ6UIZ.js');require('../../chunk-XORABVON.js');require('../../chunk-K3EKBPQE.js');require('../../chunk-WTWWDZY6.js');exports.AppException = _chunkOTZ4XGNKjs.o; exports.AppResult = _chunkOTZ4XGNKjs.p; exports.AsyncTask = _chunkOTZ4XGNKjs.r; exports.Task = _chunkOTZ4XGNKjs.q;
@@ -1 +1 @@
1
- import{r as a,s as b,t as c,u as d}from"../../chunk-QBAH7SOA.mjs";import"../../chunk-2I2NKDFN.mjs";import"../../chunk-RRAIFS3D.mjs";import"../../chunk-HD6YYUHO.mjs";import"../../chunk-JF5YGNCO.mjs";import"../../chunk-V7DKESTM.mjs";import"../../chunk-377WQNCB.mjs";import"../../chunk-HA5XD5KC.mjs";import"../../chunk-V2J3R5IU.mjs";import"../../chunk-2ML63TYF.mjs";export{a as AppException,b as AppResult,d as AsyncTask,c as Task};
1
+ import{o as a,p as b,q as c,r as d}from"../../chunk-5NZRFQ7O.mjs";import"../../chunk-JF5YGNCO.mjs";import"../../chunk-V7DKESTM.mjs";import"../../chunk-HD6YYUHO.mjs";import"../../chunk-377WQNCB.mjs";import"../../chunk-HA5XD5KC.mjs";import"../../chunk-2I2NKDFN.mjs";import"../../chunk-V2J3R5IU.mjs";import"../../chunk-2ML63TYF.mjs";import"../../chunk-4H62YQ42.mjs";export{a as AppException,b as AppResult,d as AsyncTask,c as Task};
@@ -1,5 +1,5 @@
1
1
  import '../functor/index.mjs';
2
- export { E as Either, f as Left, R as Right, e as TestEither, j as TypeCheckLeft, h as TypeCheckRight, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from '../index-Cwkc_dEO.mjs';
2
+ export { E as Either, c as Left, R as Right, T as TestEither, f as TypeCheckLeft, e as TypeCheckRight, d as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from '../index-D6OHxaFT.mjs';
3
3
  import '../typeable/Typeable.mjs';
4
4
  import '../core/base/Base.mjs';
5
5
  import '../core/error/Throwable.mjs';
@@ -1,5 +1,5 @@
1
1
  import '../functor/index.js';
2
- export { E as Either, f as Left, R as Right, e as TestEither, j as TypeCheckLeft, h as TypeCheckRight, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from '../index-B6k3GVAd.js';
2
+ export { E as Either, c as Left, R as Right, T as TestEither, f as TypeCheckLeft, e as TypeCheckRight, d as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from '../index-Bvqg1Srg.js';
3
3
  import '../typeable/Typeable.js';
4
4
  import '../core/base/Base.js';
5
5
  import '../core/error/Throwable.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk52OPFRS2js = require('../chunk-52OPFRS2.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-2U34DUZU.js');require('../chunk-SQWNJC6O.js');require('../chunk-5O6YELD3.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Either = _chunk52OPFRS2js.q; exports.Left = _chunk52OPFRS2js.j; exports.Right = _chunk52OPFRS2js.i; exports.TypeCheckLeft = _chunk52OPFRS2js.o; exports.TypeCheckRight = _chunk52OPFRS2js.n; exports.isLeft = _chunk52OPFRS2js.l; exports.isRight = _chunk52OPFRS2js.k; exports.tryCatch = _chunk52OPFRS2js.m; exports.tryCatchAsync = _chunk52OPFRS2js.p;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOTZ4XGNKjs = require('../chunk-OTZ4XGNK.js');require('../chunk-SQWNJC6O.js');require('../chunk-5O6YELD3.js');require('../chunk-2U34DUZU.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');require('../chunk-WTWWDZY6.js');exports.Either = _chunkOTZ4XGNKjs.n; exports.Left = _chunkOTZ4XGNKjs.g; exports.Right = _chunkOTZ4XGNKjs.f; exports.TypeCheckLeft = _chunkOTZ4XGNKjs.l; exports.TypeCheckRight = _chunkOTZ4XGNKjs.k; exports.isLeft = _chunkOTZ4XGNKjs.i; exports.isRight = _chunkOTZ4XGNKjs.h; exports.tryCatch = _chunkOTZ4XGNKjs.j; exports.tryCatchAsync = _chunkOTZ4XGNKjs.m;
@@ -1 +1 @@
1
- import{i as a,j as b,k as c,l as d,m as e,n as f,o as g,p as h,q as i}from"../chunk-QBAH7SOA.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-HD6YYUHO.mjs";import"../chunk-JF5YGNCO.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{i as Either,b as Left,a as Right,g as TypeCheckLeft,f as TypeCheckRight,d as isLeft,c as isRight,e as tryCatch,h as tryCatchAsync};
1
+ import{f as a,g as b,h as c,i as d,j as e,k as f,l as g,m as h,n as i}from"../chunk-5NZRFQ7O.mjs";import"../chunk-JF5YGNCO.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-HD6YYUHO.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-4H62YQ42.mjs";export{i as Either,b as Left,a as Right,g as TypeCheckLeft,f as TypeCheckRight,d as isLeft,c as isRight,e as tryCatch,h as tryCatchAsync};
@@ -16,7 +16,7 @@ type Option<T extends Type> = {
16
16
  getOrElse(defaultValue: T): T;
17
17
  getOrThrow(error: Error): T;
18
18
  orElse(alternative: Option<T>): Option<T>;
19
- getOrNull(): T | null;
19
+ orNull(): T | null;
20
20
  map<U extends Type>(f: (value: T) => U): Option<U>;
21
21
  filter(predicate: (value: T) => boolean): Option<T>;
22
22
  flatMap<U extends Type>(f: (value: T) => Option<U>): Option<U>;
@@ -41,42 +41,17 @@ declare const Option: {
41
41
  none<T>(): Option<T>;
42
42
  };
43
43
 
44
- declare const createSeq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
45
- type Seq<A> = {
46
- readonly length: number;
47
- readonly [Symbol.iterator]: () => Iterator<A>;
48
- map: <B>(f: (a: A) => B) => Seq<B>;
49
- flatMap: <B>(f: (a: A) => _Iterable_<B>) => Seq<B>;
50
- forEach: (f: (a: A) => void) => void;
51
- count: (p: (x: A) => boolean) => number;
52
- exists: (p: (a: A) => boolean) => boolean;
53
- filter: (p: (a: A) => boolean) => Seq<A>;
54
- filterNot: (p: (a: A) => boolean) => Seq<A>;
55
- find: (p: (a: A) => boolean) => Option<A>;
56
- readonly head: A;
57
- readonly headOption: Option<A>;
58
- readonly isEmpty: boolean;
59
- readonly size: number;
60
- toArray: () => A[];
61
- reduce: (f: (prev: A, curr: A) => A) => A;
62
- reduceRight: (f: (prev: A, curr: A) => A) => A;
63
- foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
64
- foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
65
- toString: () => string;
66
- toValue: () => {
67
- _tag: string;
68
- value: A[];
69
- };
70
- } & _Iterable_<A> & Typeable<"Seq">;
71
- declare const Seq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
72
-
73
- type _Iterable_<A extends Type> = {
44
+ type IterableType<A extends Type> = {
74
45
  count(p: (x: A) => boolean): number;
75
46
  find(p: (a: A) => boolean): Option<A>;
76
47
  forEach(f: (a: A) => void): void;
48
+ drop(n: number): IterableType<A>;
49
+ dropRight(n: number): IterableType<A>;
50
+ dropWhile(p: (a: A) => boolean): IterableType<A>;
77
51
  exists(p: (a: A) => boolean): boolean;
78
- filter(p: (a: A) => boolean): _Iterable_<A>;
79
- filterNot(p: (a: A) => boolean): _Iterable_<A>;
52
+ filter(p: (a: A) => boolean): IterableType<A>;
53
+ filterNot(p: (a: A) => boolean): IterableType<A>;
54
+ flatten<B>(): IterableType<B>;
80
55
  reduce(f: (b: A, a: A) => A): A;
81
56
  reduceRight(f: (b: A, a: A) => A): A;
82
57
  foldLeft<B>(z: B): (op: (b: B, a: A) => B) => B;
@@ -84,11 +59,22 @@ type _Iterable_<A extends Type> = {
84
59
  get head(): A;
85
60
  get headOption(): Option<A>;
86
61
  get isEmpty(): boolean;
87
- map<B extends Type>(f: (a: A) => B): _Iterable_<B>;
88
- flatMap<B extends Type>(f: (a: A) => _Iterable_<B> | Iterable<B>): _Iterable_<B>;
62
+ map<B extends Type>(f: (a: A) => B): IterableType<B>;
63
+ flatMap<B extends Type>(f: (a: A) => IterableType<B>): IterableType<B>;
89
64
  get size(): number;
90
65
  toArray(): readonly A[];
91
- } & Functor<A>;
66
+ toValue: () => {
67
+ _tag: string;
68
+ value: A[];
69
+ };
70
+ } & Iterable<A> & Functor<A>;
71
+
72
+ type Converters<A> = {
73
+ toList(): List<A>;
74
+ toSet(): Set<A>;
75
+ toString(): string;
76
+ };
77
+ type Collection<A> = Converters<A>;
92
78
 
93
79
  type Set<A> = {
94
80
  add: (value: A) => Set<A>;
@@ -96,28 +82,35 @@ type Set<A> = {
96
82
  contains: (value: A) => boolean;
97
83
  has: (value: A) => boolean;
98
84
  map: <B>(f: (a: A) => B) => Set<B>;
99
- flatMap: <B>(f: (a: A) => _Iterable_<B>) => Set<B>;
85
+ flatMap: <B>(f: (a: A) => IterableType<B>) => Set<B>;
100
86
  toList: () => List<A>;
101
87
  toSet: () => Set<A>;
102
88
  toString: () => string;
103
- } & _Iterable_<A> & Collection<A>;
104
- declare const Set: <A>(iterable?: Iterable<A> | _Iterable_<A>) => Set<A>;
105
-
106
- type Converters<A> = {
107
- toList(): List<A>;
108
- toSet(): Set<A>;
109
- toString(): string;
110
- };
111
- type Collection<A> = Converters<A>;
89
+ } & IterableType<A> & Collection<A>;
90
+ declare const Set: <A>(iterable?: Iterable<A> | IterableType<A>) => Set<A>;
112
91
 
113
- type InternalList<A> = List<A> & ArrayLike<A> & _Iterable_<A> & Collection<A>;
114
92
  type List<A> = {
115
- add: (item: A) => List<A>;
93
+ readonly length: number;
94
+ readonly [Symbol.iterator]: () => Iterator<A>;
116
95
  map: <B>(f: (a: A) => B) => List<B>;
117
- flatMap: <B>(f: (a: A) => _Iterable_<B>) => List<B>;
96
+ flatMap: <B>(f: (a: A) => IterableType<B>) => List<B>;
97
+ forEach: (f: (a: A) => void) => void;
98
+ count: (p: (x: A) => boolean) => number;
99
+ exists: (p: (a: A) => boolean) => boolean;
100
+ filter: (p: (a: A) => boolean) => List<A>;
101
+ filterNot: (p: (a: A) => boolean) => List<A>;
102
+ find: (p: (a: A) => boolean) => Option<A>;
103
+ readonly head: A;
104
+ readonly headOption: Option<A>;
105
+ readonly isEmpty: boolean;
106
+ toArray: () => A[];
107
+ reduce: (f: (prev: A, curr: A) => A) => A;
108
+ reduceRight: (f: (prev: A, curr: A) => A) => A;
109
+ foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
110
+ foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
118
111
  remove: (value: A) => List<A>;
119
- contains: (value: A) => boolean;
120
112
  removeAt: (index: number) => List<A>;
113
+ add: (item: A) => List<A>;
121
114
  get: (index: number) => Option<A>;
122
115
  concat: (other: List<A>) => List<A>;
123
116
  toList: () => List<A>;
@@ -127,9 +120,8 @@ type List<A> = {
127
120
  _tag: string;
128
121
  value: A[];
129
122
  };
130
- } & Seq<A> & Typeable<"List">;
131
- declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
132
- declare const TestList: <A>(values?: Iterable<A> | _Iterable_<A>) => InternalList<A>;
123
+ } & IterableType<A> & Typeable<"List">;
124
+ declare const List: <A>(values?: Iterable<A>) => List<A>;
133
125
 
134
126
  type TestEither<L extends Type, R extends Type> = Either<L, R> & Functor<R>;
135
127
  declare const Right: <L extends Type, R extends Type>(value: R) => Either<L, R>;
@@ -207,7 +199,7 @@ type Map<K, V> = {
207
199
  add(item: Tuple<[K, V]>): Map<K, V>;
208
200
  remove(value: K): Map<K, V>;
209
201
  map<U>(f: (value: V) => U): Map<K, U>;
210
- flatMap<K2, V2>(f: (entry: Tuple<[K, V]>) => _Iterable_<[K2, V2]>): Map<K2, V2>;
202
+ flatMap<K2, V2>(f: (entry: Tuple<[K, V]>) => IterableType<[K2, V2]>): Map<K2, V2>;
211
203
  get(key: K): Option<V>;
212
204
  getOrElse(key: K, defaultValue: V): V;
213
205
  orElse(key: K, alternative: Option<V>): Option<V>;
@@ -241,4 +233,4 @@ type Traversable<A extends Type> = Functor<A> & {
241
233
  foldRight<B>(z: B): (op: (a: A, b: B) => B) => B;
242
234
  };
243
235
 
244
- export { AppException as A, type Converters as C, Either as E, List as L, Map as M, None as N, Option as O, Right as R, Some as S, TestList as T, type _Iterable_ as _, Seq as a, Set as b, createSeq as c, type Collection as d, type TestEither as e, Left as f, isLeft as g, TypeCheckRight as h, isRight as i, TypeCheckLeft as j, tryCatchAsync as k, AppResult as l, Task as m, AsyncTask as n, Try as o, type Traversable as p, tryCatch as t };
236
+ export { AppException as A, type Converters as C, Either as E, type IterableType as I, List as L, Map as M, None as N, Option as O, Right as R, Some as S, type TestEither as T, type Collection as a, Set as b, Left as c, isLeft as d, TypeCheckRight as e, TypeCheckLeft as f, tryCatchAsync as g, AppResult as h, isRight as i, Task as j, AsyncTask as k, Try as l, type Traversable as m, tryCatch as t };
@@ -16,7 +16,7 @@ type Option<T extends Type> = {
16
16
  getOrElse(defaultValue: T): T;
17
17
  getOrThrow(error: Error): T;
18
18
  orElse(alternative: Option<T>): Option<T>;
19
- getOrNull(): T | null;
19
+ orNull(): T | null;
20
20
  map<U extends Type>(f: (value: T) => U): Option<U>;
21
21
  filter(predicate: (value: T) => boolean): Option<T>;
22
22
  flatMap<U extends Type>(f: (value: T) => Option<U>): Option<U>;
@@ -41,42 +41,17 @@ declare const Option: {
41
41
  none<T>(): Option<T>;
42
42
  };
43
43
 
44
- declare const createSeq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
45
- type Seq<A> = {
46
- readonly length: number;
47
- readonly [Symbol.iterator]: () => Iterator<A>;
48
- map: <B>(f: (a: A) => B) => Seq<B>;
49
- flatMap: <B>(f: (a: A) => _Iterable_<B>) => Seq<B>;
50
- forEach: (f: (a: A) => void) => void;
51
- count: (p: (x: A) => boolean) => number;
52
- exists: (p: (a: A) => boolean) => boolean;
53
- filter: (p: (a: A) => boolean) => Seq<A>;
54
- filterNot: (p: (a: A) => boolean) => Seq<A>;
55
- find: (p: (a: A) => boolean) => Option<A>;
56
- readonly head: A;
57
- readonly headOption: Option<A>;
58
- readonly isEmpty: boolean;
59
- readonly size: number;
60
- toArray: () => A[];
61
- reduce: (f: (prev: A, curr: A) => A) => A;
62
- reduceRight: (f: (prev: A, curr: A) => A) => A;
63
- foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
64
- foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
65
- toString: () => string;
66
- toValue: () => {
67
- _tag: string;
68
- value: A[];
69
- };
70
- } & _Iterable_<A> & Typeable<"Seq">;
71
- declare const Seq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
72
-
73
- type _Iterable_<A extends Type> = {
44
+ type IterableType<A extends Type> = {
74
45
  count(p: (x: A) => boolean): number;
75
46
  find(p: (a: A) => boolean): Option<A>;
76
47
  forEach(f: (a: A) => void): void;
48
+ drop(n: number): IterableType<A>;
49
+ dropRight(n: number): IterableType<A>;
50
+ dropWhile(p: (a: A) => boolean): IterableType<A>;
77
51
  exists(p: (a: A) => boolean): boolean;
78
- filter(p: (a: A) => boolean): _Iterable_<A>;
79
- filterNot(p: (a: A) => boolean): _Iterable_<A>;
52
+ filter(p: (a: A) => boolean): IterableType<A>;
53
+ filterNot(p: (a: A) => boolean): IterableType<A>;
54
+ flatten<B>(): IterableType<B>;
80
55
  reduce(f: (b: A, a: A) => A): A;
81
56
  reduceRight(f: (b: A, a: A) => A): A;
82
57
  foldLeft<B>(z: B): (op: (b: B, a: A) => B) => B;
@@ -84,11 +59,22 @@ type _Iterable_<A extends Type> = {
84
59
  get head(): A;
85
60
  get headOption(): Option<A>;
86
61
  get isEmpty(): boolean;
87
- map<B extends Type>(f: (a: A) => B): _Iterable_<B>;
88
- flatMap<B extends Type>(f: (a: A) => _Iterable_<B> | Iterable<B>): _Iterable_<B>;
62
+ map<B extends Type>(f: (a: A) => B): IterableType<B>;
63
+ flatMap<B extends Type>(f: (a: A) => IterableType<B>): IterableType<B>;
89
64
  get size(): number;
90
65
  toArray(): readonly A[];
91
- } & Functor<A>;
66
+ toValue: () => {
67
+ _tag: string;
68
+ value: A[];
69
+ };
70
+ } & Iterable<A> & Functor<A>;
71
+
72
+ type Converters<A> = {
73
+ toList(): List<A>;
74
+ toSet(): Set<A>;
75
+ toString(): string;
76
+ };
77
+ type Collection<A> = Converters<A>;
92
78
 
93
79
  type Set<A> = {
94
80
  add: (value: A) => Set<A>;
@@ -96,28 +82,35 @@ type Set<A> = {
96
82
  contains: (value: A) => boolean;
97
83
  has: (value: A) => boolean;
98
84
  map: <B>(f: (a: A) => B) => Set<B>;
99
- flatMap: <B>(f: (a: A) => _Iterable_<B>) => Set<B>;
85
+ flatMap: <B>(f: (a: A) => IterableType<B>) => Set<B>;
100
86
  toList: () => List<A>;
101
87
  toSet: () => Set<A>;
102
88
  toString: () => string;
103
- } & _Iterable_<A> & Collection<A>;
104
- declare const Set: <A>(iterable?: Iterable<A> | _Iterable_<A>) => Set<A>;
105
-
106
- type Converters<A> = {
107
- toList(): List<A>;
108
- toSet(): Set<A>;
109
- toString(): string;
110
- };
111
- type Collection<A> = Converters<A>;
89
+ } & IterableType<A> & Collection<A>;
90
+ declare const Set: <A>(iterable?: Iterable<A> | IterableType<A>) => Set<A>;
112
91
 
113
- type InternalList<A> = List<A> & ArrayLike<A> & _Iterable_<A> & Collection<A>;
114
92
  type List<A> = {
115
- add: (item: A) => List<A>;
93
+ readonly length: number;
94
+ readonly [Symbol.iterator]: () => Iterator<A>;
116
95
  map: <B>(f: (a: A) => B) => List<B>;
117
- flatMap: <B>(f: (a: A) => _Iterable_<B>) => List<B>;
96
+ flatMap: <B>(f: (a: A) => IterableType<B>) => List<B>;
97
+ forEach: (f: (a: A) => void) => void;
98
+ count: (p: (x: A) => boolean) => number;
99
+ exists: (p: (a: A) => boolean) => boolean;
100
+ filter: (p: (a: A) => boolean) => List<A>;
101
+ filterNot: (p: (a: A) => boolean) => List<A>;
102
+ find: (p: (a: A) => boolean) => Option<A>;
103
+ readonly head: A;
104
+ readonly headOption: Option<A>;
105
+ readonly isEmpty: boolean;
106
+ toArray: () => A[];
107
+ reduce: (f: (prev: A, curr: A) => A) => A;
108
+ reduceRight: (f: (prev: A, curr: A) => A) => A;
109
+ foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
110
+ foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
118
111
  remove: (value: A) => List<A>;
119
- contains: (value: A) => boolean;
120
112
  removeAt: (index: number) => List<A>;
113
+ add: (item: A) => List<A>;
121
114
  get: (index: number) => Option<A>;
122
115
  concat: (other: List<A>) => List<A>;
123
116
  toList: () => List<A>;
@@ -127,9 +120,8 @@ type List<A> = {
127
120
  _tag: string;
128
121
  value: A[];
129
122
  };
130
- } & Seq<A> & Typeable<"List">;
131
- declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
132
- declare const TestList: <A>(values?: Iterable<A> | _Iterable_<A>) => InternalList<A>;
123
+ } & IterableType<A> & Typeable<"List">;
124
+ declare const List: <A>(values?: Iterable<A>) => List<A>;
133
125
 
134
126
  type TestEither<L extends Type, R extends Type> = Either<L, R> & Functor<R>;
135
127
  declare const Right: <L extends Type, R extends Type>(value: R) => Either<L, R>;
@@ -207,7 +199,7 @@ type Map<K, V> = {
207
199
  add(item: Tuple<[K, V]>): Map<K, V>;
208
200
  remove(value: K): Map<K, V>;
209
201
  map<U>(f: (value: V) => U): Map<K, U>;
210
- flatMap<K2, V2>(f: (entry: Tuple<[K, V]>) => _Iterable_<[K2, V2]>): Map<K2, V2>;
202
+ flatMap<K2, V2>(f: (entry: Tuple<[K, V]>) => IterableType<[K2, V2]>): Map<K2, V2>;
211
203
  get(key: K): Option<V>;
212
204
  getOrElse(key: K, defaultValue: V): V;
213
205
  orElse(key: K, alternative: Option<V>): Option<V>;
@@ -241,4 +233,4 @@ type Traversable<A extends Type> = Functor<A> & {
241
233
  foldRight<B>(z: B): (op: (a: A, b: B) => B) => B;
242
234
  };
243
235
 
244
- export { AppException as A, type Converters as C, Either as E, List as L, Map as M, None as N, Option as O, Right as R, Some as S, TestList as T, type _Iterable_ as _, Seq as a, Set as b, createSeq as c, type Collection as d, type TestEither as e, Left as f, isLeft as g, TypeCheckRight as h, isRight as i, TypeCheckLeft as j, tryCatchAsync as k, AppResult as l, Task as m, AsyncTask as n, Try as o, type Traversable as p, tryCatch as t };
236
+ export { AppException as A, type Converters as C, Either as E, type IterableType as I, List as L, Map as M, None as N, Option as O, Right as R, Some as S, type TestEither as T, type Collection as a, Set as b, Left as c, isLeft as d, TypeCheckRight as e, TypeCheckLeft as f, tryCatchAsync as g, AppResult as h, isRight as i, Task as j, AsyncTask as k, Try as l, type Traversable as m, tryCatch as t };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { AbstractFunctor, ArrayFunctor, ArrayType, Functor, SingleType, Type } from './functor/index.mjs';
2
2
  export { Base } from './core/base/Base.mjs';
3
3
  export { Throwable } from './core/error/Throwable.mjs';
4
- export { A as AppException, l as AppResult, n as AsyncTask, E as Either, f as Left, L as List, M as Map, N as None, O as Option, R as Right, a as Seq, b as Set, S as Some, m as Task, e as TestEither, T as TestList, p as Traversable, o as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-Cwkc_dEO.mjs';
4
+ export { A as AppException, h as AppResult, k as AsyncTask, E as Either, I as IterableType, c as Left, L as List, M as Map, N as None, O as Option, R as Right, b as Set, S as Some, j as Task, T as TestEither, m as Traversable, l as Try, f as TypeCheckLeft, e as TypeCheckRight, d as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from './index-D6OHxaFT.mjs';
5
5
  export { Identity } from './identity/Identity.mjs';
6
6
  export { Tuple } from './tuple/Tuple.mjs';
7
- export { Typeable } from './typeable/Typeable.mjs';
7
+ export { Typeable, UnTag } from './typeable/Typeable.mjs';
8
8
  import './valuable/Valuable.mjs';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { AbstractFunctor, ArrayFunctor, ArrayType, Functor, SingleType, Type } from './functor/index.js';
2
2
  export { Base } from './core/base/Base.js';
3
3
  export { Throwable } from './core/error/Throwable.js';
4
- export { A as AppException, l as AppResult, n as AsyncTask, E as Either, f as Left, L as List, M as Map, N as None, O as Option, R as Right, a as Seq, b as Set, S as Some, m as Task, e as TestEither, T as TestList, p as Traversable, o as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-B6k3GVAd.js';
4
+ export { A as AppException, h as AppResult, k as AsyncTask, E as Either, I as IterableType, c as Left, L as List, M as Map, N as None, O as Option, R as Right, b as Set, S as Some, j as Task, T as TestEither, m as Traversable, l as Try, f as TypeCheckLeft, e as TypeCheckRight, d as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from './index-Bvqg1Srg.js';
5
5
  export { Identity } from './identity/Identity.js';
6
6
  export { Tuple } from './tuple/Tuple.js';
7
- export { Typeable } from './typeable/Typeable.js';
7
+ export { Typeable, UnTag } from './typeable/Typeable.js';
8
8
  import './valuable/Valuable.js';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk52OPFRS2js = require('./chunk-52OPFRS2.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');require('./chunk-BNNK42JC.js');var _chunk2U34DUZUjs = require('./chunk-2U34DUZU.js');var _chunkSQWNJC6Ojs = require('./chunk-SQWNJC6O.js');var _chunk5O6YELD3js = require('./chunk-5O6YELD3.js');require('./chunk-5VTXJIR3.js');require('./chunk-3VJERXBP.js');require('./chunk-XORABVON.js');require('./chunk-K3EKBPQE.js');exports.AppException = _chunk52OPFRS2js.r; exports.AppResult = _chunk52OPFRS2js.s; exports.AsyncTask = _chunk52OPFRS2js.u; exports.Base = _chunkSQWNJC6Ojs.a; exports.Either = _chunk52OPFRS2js.q; exports.Left = _chunk52OPFRS2js.j; exports.List = _chunk52OPFRS2js.g; exports.Map = _chunk52OPFRS2js.v; exports.None = _chunk52OPFRS2js.b; exports.Option = _chunk52OPFRS2js.c; exports.Right = _chunk52OPFRS2js.i; exports.Seq = _chunk52OPFRS2js.e; exports.Set = _chunk52OPFRS2js.f; exports.Some = _chunk52OPFRS2js.a; exports.Task = _chunk52OPFRS2js.t; exports.TestList = _chunk52OPFRS2js.h; exports.Throwable = _chunk2U34DUZUjs.a; exports.Try = _chunk52OPFRS2js.w; exports.Tuple = _chunkOXLZ6UIZjs.a; exports.TypeCheckLeft = _chunk52OPFRS2js.o; exports.TypeCheckRight = _chunk52OPFRS2js.n; exports.Typeable = _chunk5O6YELD3js.a; exports.isLeft = _chunk52OPFRS2js.l; exports.isRight = _chunk52OPFRS2js.k; exports.tryCatch = _chunk52OPFRS2js.m; exports.tryCatchAsync = _chunk52OPFRS2js.p;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOTZ4XGNKjs = require('./chunk-OTZ4XGNK.js');var _chunkSQWNJC6Ojs = require('./chunk-SQWNJC6O.js');var _chunk5O6YELD3js = require('./chunk-5O6YELD3.js');var _chunk2U34DUZUjs = require('./chunk-2U34DUZU.js');require('./chunk-5VTXJIR3.js');require('./chunk-3VJERXBP.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');require('./chunk-XORABVON.js');require('./chunk-K3EKBPQE.js');require('./chunk-WTWWDZY6.js');exports.AppException = _chunkOTZ4XGNKjs.o; exports.AppResult = _chunkOTZ4XGNKjs.p; exports.AsyncTask = _chunkOTZ4XGNKjs.r; exports.Base = _chunkSQWNJC6Ojs.a; exports.Either = _chunkOTZ4XGNKjs.n; exports.Left = _chunkOTZ4XGNKjs.g; exports.List = _chunkOTZ4XGNKjs.e; exports.Map = _chunkOTZ4XGNKjs.s; exports.None = _chunkOTZ4XGNKjs.b; exports.Option = _chunkOTZ4XGNKjs.c; exports.Right = _chunkOTZ4XGNKjs.f; exports.Set = _chunkOTZ4XGNKjs.d; exports.Some = _chunkOTZ4XGNKjs.a; exports.Task = _chunkOTZ4XGNKjs.q; exports.Throwable = _chunk2U34DUZUjs.a; exports.Try = _chunkOTZ4XGNKjs.t; exports.Tuple = _chunkOXLZ6UIZjs.a; exports.TypeCheckLeft = _chunkOTZ4XGNKjs.l; exports.TypeCheckRight = _chunkOTZ4XGNKjs.k; exports.Typeable = _chunk5O6YELD3js.a; exports.isLeft = _chunkOTZ4XGNKjs.i; exports.isRight = _chunkOTZ4XGNKjs.h; exports.tryCatch = _chunkOTZ4XGNKjs.j; exports.tryCatchAsync = _chunkOTZ4XGNKjs.m;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{a as d,b as e,c as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p,o as q,p as r,q as s,r as t,s as u,t as v,u as w,v as y,w as z}from"./chunk-QBAH7SOA.mjs";import{a as x}from"./chunk-2I2NKDFN.mjs";import"./chunk-RRAIFS3D.mjs";import{a as c}from"./chunk-HD6YYUHO.mjs";import{a as b}from"./chunk-JF5YGNCO.mjs";import{a}from"./chunk-V7DKESTM.mjs";import"./chunk-377WQNCB.mjs";import"./chunk-HA5XD5KC.mjs";import"./chunk-V2J3R5IU.mjs";import"./chunk-2ML63TYF.mjs";export{t as AppException,u as AppResult,w as AsyncTask,b as Base,s as Either,l as Left,i as List,y as Map,e as None,f as Option,k as Right,g as Seq,h as Set,d as Some,v as Task,j as TestList,c as Throwable,z as Try,x as Tuple,q as TypeCheckLeft,p as TypeCheckRight,a as Typeable,n as isLeft,m as isRight,o as tryCatch,r as tryCatchAsync};
1
+ import{a as d,b as e,c as f,d as g,e as h,f as i,g as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q,o as r,p as s,q as t,r as u,s as w,t as x}from"./chunk-5NZRFQ7O.mjs";import{a as b}from"./chunk-JF5YGNCO.mjs";import{a}from"./chunk-V7DKESTM.mjs";import{a as c}from"./chunk-HD6YYUHO.mjs";import"./chunk-377WQNCB.mjs";import"./chunk-HA5XD5KC.mjs";import{a as v}from"./chunk-2I2NKDFN.mjs";import"./chunk-V2J3R5IU.mjs";import"./chunk-2ML63TYF.mjs";import"./chunk-4H62YQ42.mjs";export{r as AppException,s as AppResult,u as AsyncTask,b as Base,q as Either,j as Left,h as List,w as Map,e as None,f as Option,i as Right,g as Set,d as Some,t as Task,c as Throwable,x as Try,v as Tuple,o as TypeCheckLeft,n as TypeCheckRight,a as Typeable,l as isLeft,k as isRight,m as tryCatch,p as tryCatchAsync};
@@ -1,5 +1,5 @@
1
1
  import '../functor/index.mjs';
2
- export { a as Seq, _ as _Iterable_ } from '../index-Cwkc_dEO.mjs';
2
+ export { I as IterableType } from '../index-D6OHxaFT.mjs';
3
3
  import '../core/base/Base.mjs';
4
4
  import '../core/error/Throwable.mjs';
5
5
  import '../typeable/Typeable.mjs';
@@ -1,5 +1,5 @@
1
1
  import '../functor/index.js';
2
- export { a as Seq, _ as _Iterable_ } from '../index-B6k3GVAd.js';
2
+ export { I as IterableType } from '../index-Bvqg1Srg.js';
3
3
  import '../core/base/Base.js';
4
4
  import '../core/error/Throwable.js';
5
5
  import '../typeable/Typeable.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk52OPFRS2js = require('../chunk-52OPFRS2.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-2U34DUZU.js');require('../chunk-SQWNJC6O.js');require('../chunk-5O6YELD3.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Seq = _chunk52OPFRS2js.e;
1
+ "use strict";require('../chunk-WTWWDZY6.js');
@@ -1 +1 @@
1
- import{e as a}from"../chunk-QBAH7SOA.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-HD6YYUHO.mjs";import"../chunk-JF5YGNCO.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Seq};
1
+ import"../chunk-4H62YQ42.mjs";
@@ -1,4 +1,4 @@
1
- export { L as List, T as TestList } from '../index-Cwkc_dEO.mjs';
1
+ export { L as List } from '../index-D6OHxaFT.mjs';
2
2
  import '../typeable/Typeable.mjs';
3
3
  import '../functor/index.mjs';
4
4
  import '../core/base/Base.mjs';
@@ -1,4 +1,4 @@
1
- export { L as List, T as TestList } from '../index-B6k3GVAd.js';
1
+ export { L as List } from '../index-Bvqg1Srg.js';
2
2
  import '../typeable/Typeable.js';
3
3
  import '../functor/index.js';
4
4
  import '../core/base/Base.js';