functype 0.8.24 → 0.8.26

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 (62) hide show
  1. package/dist/chunk-HGAOWVBI.js +1 -0
  2. package/dist/chunk-NJJ3CNH5.mjs +1 -0
  3. package/dist/collections/index.d.mts +1 -1
  4. package/dist/collections/index.d.ts +1 -1
  5. package/dist/either/Either.d.mts +1 -1
  6. package/dist/either/Either.d.ts +1 -1
  7. package/dist/either/Either.js +1 -1
  8. package/dist/either/Either.mjs +1 -1
  9. package/dist/either/EitherT.d.mts +1 -1
  10. package/dist/either/EitherT.d.ts +1 -1
  11. package/dist/either/EitherT.js +1 -1
  12. package/dist/either/EitherT.mjs +1 -1
  13. package/dist/{index-CLb1bm75.d.mts → index-BWBqO3Kp.d.mts} +12 -20
  14. package/dist/{index-DO4eHo7t.d.ts → index-DQD4k2t3.d.ts} +12 -20
  15. package/dist/index.d.mts +1 -1
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/index.mjs +1 -1
  19. package/dist/iterable/Seq.d.mts +2 -2
  20. package/dist/iterable/Seq.d.ts +2 -2
  21. package/dist/iterable/Seq.js +1 -1
  22. package/dist/iterable/Seq.mjs +1 -1
  23. package/dist/iterable/index.d.mts +1 -1
  24. package/dist/iterable/index.d.ts +1 -1
  25. package/dist/iterable/index.js +1 -1
  26. package/dist/iterable/index.mjs +1 -1
  27. package/dist/list/List.d.mts +1 -1
  28. package/dist/list/List.d.ts +1 -1
  29. package/dist/list/List.js +1 -1
  30. package/dist/list/List.mjs +1 -1
  31. package/dist/map/Map.d.mts +1 -1
  32. package/dist/map/Map.d.ts +1 -1
  33. package/dist/map/Map.js +1 -1
  34. package/dist/map/Map.mjs +1 -1
  35. package/dist/option/Option.d.mts +1 -1
  36. package/dist/option/Option.d.ts +1 -1
  37. package/dist/option/Option.js +1 -1
  38. package/dist/option/Option.mjs +1 -1
  39. package/dist/set/Set.d.mts +1 -1
  40. package/dist/set/Set.d.ts +1 -1
  41. package/dist/set/Set.js +1 -1
  42. package/dist/set/Set.mjs +1 -1
  43. package/dist/try/Try.d.mts +1 -1
  44. package/dist/try/Try.d.ts +1 -1
  45. package/dist/try/Try.js +1 -1
  46. package/dist/try/Try.mjs +1 -1
  47. package/dist/typeable/Typeable.d.mts +3 -3
  48. package/dist/typeable/Typeable.d.ts +3 -3
  49. package/dist/util/index.d.mts +1 -1
  50. package/dist/util/index.d.ts +1 -1
  51. package/dist/util/index.js +1 -1
  52. package/dist/util/index.mjs +1 -1
  53. package/lib/either/AsyncEither.d.ts +10 -0
  54. package/lib/either/Either.d.ts +0 -4
  55. package/lib/iterable/Seq.d.ts +6 -4
  56. package/lib/list/List.d.ts +3 -3
  57. package/lib/option/Option.d.ts +4 -4
  58. package/lib/try/Try.d.ts +0 -5
  59. package/lib/typeable/Typeable.d.ts +3 -3
  60. package/package.json +1 -1
  61. package/dist/chunk-SZOZHGAQ.js +0 -1
  62. package/dist/chunk-TF4ZCVID.mjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk3VJERXBPjs = require('./chunk-3VJERXBP.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var _chunkBNNK42JCjs = require('./chunk-BNNK42JC.js');var _chunk5VTXJIR3js = require('./chunk-5VTXJIR3.js');var _safestablestringify = require('safe-stable-stringify'); var _safestablestringify2 = _interopRequireDefault(_safestablestringify);var y=e=>{let t=_chunkBNNK42JCjs.a.call(void 0, e)?e:e instanceof Object&&"toArray"in e?e.toArray():[],r=Array.from(t),i="Seq";return{[Symbol.iterator]:()=>r[Symbol.iterator](),get length(){return r.length},_tag:i,map:o=>y(r.map(o)),flatMap:o=>y(r.flatMap(n=>o(n).toArray())),forEach:o=>r.forEach(o),count:o=>r.filter(o).length,exists:o=>r.some(o),filter:o=>y(r.filter(o)),filterNot:o=>y(r.filter(n=>!o(n))),find:o=>A(r.find(o)),get head(){return r[0]},get headOption(){return r.length>0?A(r[0]):L()},get isEmpty(){return r.length===0},get size(){return r.length},toArray:()=>[...r],reduce:o=>r.reduce(o),reduceRight:o=>r.reduceRight(o),foldLeft:o=>n=>r.reduce(n,o),foldRight:o=>n=>r.reduceRight((u,x)=>n(x,u),o),toString:()=>`Seq(${_safestablestringify2.default.call(void 0, e)})`,toValue:()=>({_tag:i,value:r})}},T= exports.e =e=>y(e);var g=e=>{let t=_chunkBNNK42JCjs.a.call(void 0, e)?new (0, _chunk3VJERXBPjs.a)(e):new (0, _chunk3VJERXBPjs.a)(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _2 => _2.toArray, 'call', _3 => _3()]), () => ([]))),r=T(t),i={...r,add:o=>g([...t,o]),remove:o=>{let n=new (0, _chunk3VJERXBPjs.a)(t);return n.delete(o),g(n)},contains:o=>t.has(o),has:o=>t.has(o),map:o=>g(r.map(o)),flatMap:o=>g(r.flatMap(o)),toList:()=>p(t),toSet:()=>i,toString:()=>`Set(${Array.from(t).toString()})`};return i},R= exports.f =e=>g(e);var m=e=>{function t(n){return n!=null&&typeof n[Symbol.iterator]=="function"}let r=Array.isArray(e)?e:t(e)?Array.from(e):[],i=T(r),o={...i,_tag:"List",length:r.length,map:n=>m(r.map(n)),flatMap:n=>m(i.flatMap(n)),remove:n=>{let u=r.indexOf(n);return o.removeAt(u)},contains:n=>r.includes(n),add:n=>m([...r,n]),removeAt:n=>n<0||n>=r.length?o:m([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>m([...r,...n.toArray()]),toList:()=>o,toSet:()=>R(r),toValue:()=>({_tag:"List",value:r}),toString:()=>`List(${_safestablestringify2.default.call(void 0, p(r))})`};return new Proxy(o,{get(n,u){return typeof u=="symbol"||isNaN(Number(u))?n[u]:n.get(Number(u))}})},p= exports.g =e=>m(e),H= exports.h =e=>m(e);console.assert(H);var O=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>f(t(e)),mapAsync:t=>t(e).then(r=>f(r)).catch(r=>s(r)),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>s(r)),toOption:()=>d(e),toList:()=>p([e]),toString:()=>`Right(${_safestablestringify2.default.call(void 0, e)})`}),K=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>s(e),mapAsync:t=>Promise.resolve(s(e)),flatMap:t=>s(e),flatMapAsync:t=>Promise.resolve(s(e)),toOption:()=>L(),toList:()=>p(),toString:()=>`Left(${_safestablestringify2.default.call(void 0, e)})`}),f= exports.i =e=>O(e),s= exports.j =e=>K(e),B= exports.k =e=>e.isRight(),I= exports.l =e=>e.isLeft(),Be= exports.m =(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},J= exports.n =e=>O(e);console.assert(J);var Q=e=>K(e);console.assert(Q);var xe=async(e,t)=>{try{let r=await e();return f(r)}catch(r){return s(t(r))}};function S(e){return{value:e,map(t){let r=e.then(i=>{if(B(i))try{let o=t(i.value);return f(o)}catch(o){return s(o)}else return s(i.value)});return S(r)},flatMap(t){let r=e.then(i=>{if(B(i))try{return t(i.value).value}catch(o){return Promise.resolve(s(o))}else return Promise.resolve(s(i.value))});return S(r)},mapLeft(t){let r=e.then(i=>{if(I(i))try{let o=t(i.value);return s(o)}catch(o){return s(o)}else return f(i.value)});return S(r)},fold(t,r){return e.then(i=>B(i)?r(i.value):t(i.value))}}}var c=e=>{let t={values:new (0, _chunk5VTXJIR3js.a)(e)},r=()=>Array.from(t.values.entries()).map(([a,l])=>_chunkOXLZ6UIZjs.a.call(void 0, [a,l])),i=a=>c(new (0, _chunk5VTXJIR3js.a)(t.values).set(a.toArray()[0],a.toArray()[1]).entries()),o=a=>{let l=new (0, _chunk5VTXJIR3js.a)(t.values);return l.delete(a)?c(l.entries()):c(t.values.entries())},n=a=>t.values.get(a[0])===a[1],u=()=>t.values.size,x=a=>c(Array.from(t.values.entries()).map(([l,j])=>[l,a(j)])),P=a=>{let l=c(t.values.entries()).toList();return c(l.flatMap(a).toArray())},q=a=>T(r()).reduce(a),z=a=>T(r()).reduceRight(a),N=a=>l=>T(r()).foldLeft(a)(l),k=a=>l=>T(r()).foldRight(a)(l),F=a=>A(t.values.get(a)),C=(a,l)=>A(t.values.get(a)).getOrElse(l),$=()=>t.values.size===0;return{add:i,remove:o,contains:n,get size(){return u()},map:x,flatMap:P,reduce:q,reduceRight:z,foldLeft:N,foldRight:k,get:F,getOrElse:C,get isEmpty(){return $()},orElse:(a,l)=>A(t.values.get(a)).orElse(l),toList:()=>p(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},Ne= exports.r =e=>c(e);var w=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>w(e),orThrow:t=>e,toEither:()=>f(e),map:t=>W(()=>t(e)),flatMap:t=>t(e),toString:()=>`Success(${_safestablestringify2.default.call(void 0, e)})`}),_=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:()=>s(e),map:t=>_(e),flatMap:t=>_(e),toString:()=>`Failure(${_safestablestringify2.default.call(void 0, e)}))`}),W= exports.s =e=>{try{return w(e())}catch(t){return _(t instanceof Error?t:new Error(String(t)))}};var d=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,orElse:()=>d(e),map:t=>d(t(e)),filter(t){return t(e)?d(e):h},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:()=>p([e]),contains:t=>t===e,size:1,toEither:t=>f(e),toString:()=>`Some(${_safestablestringify2.default.call(void 0, e)})`,toValue:()=>({_tag:"Some",value:e})}),h={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,orElse:e=>e,map:e=>h,filter(e){return h},flatMap:e=>h,reduce:()=>{},reduceRight:()=>{},foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0})},L= exports.b =()=>h,A= exports.c =e=>e!=null?d(e):L();exports.a = d; exports.b = L; exports.c = A; exports.d = y; exports.e = T; exports.f = R; exports.g = p; exports.h = H; exports.i = f; exports.j = s; exports.k = B; exports.l = I; exports.m = Be; exports.n = J; exports.o = Q; exports.p = xe; exports.q = S; exports.r = Ne; exports.s = W;
@@ -0,0 +1 @@
1
+ import{a as U}from"./chunk-HA5XD5KC.mjs";import{a as v}from"./chunk-2I2NKDFN.mjs";import{a as b}from"./chunk-RRAIFS3D.mjs";import{a as E}from"./chunk-377WQNCB.mjs";import G from"safe-stable-stringify";import D from"safe-stable-stringify";var y=e=>{let t=b(e)?e:e instanceof Object&&"toArray"in e?e.toArray():[],r=Array.from(t),i="Seq";return{[Symbol.iterator]:()=>r[Symbol.iterator](),get length(){return r.length},_tag:i,map:o=>y(r.map(o)),flatMap:o=>y(r.flatMap(n=>o(n).toArray())),forEach:o=>r.forEach(o),count:o=>r.filter(o).length,exists:o=>r.some(o),filter:o=>y(r.filter(o)),filterNot:o=>y(r.filter(n=>!o(n))),find:o=>A(r.find(o)),get head(){return r[0]},get headOption(){return r.length>0?A(r[0]):L()},get isEmpty(){return r.length===0},get size(){return r.length},toArray:()=>[...r],reduce:o=>r.reduce(o),reduceRight:o=>r.reduceRight(o),foldLeft:o=>n=>r.reduce(n,o),foldRight:o=>n=>r.reduceRight((u,x)=>n(x,u),o),toString:()=>`Seq(${D(e)})`,toValue:()=>({_tag:i,value:r})}},T=e=>y(e);var g=e=>{let t=b(e)?new U(e):new U(e?.toArray()??[]),r=T(t),i={...r,add:o=>g([...t,o]),remove:o=>{let n=new U(t);return n.delete(o),g(n)},contains:o=>t.has(o),has:o=>t.has(o),map:o=>g(r.map(o)),flatMap:o=>g(r.flatMap(o)),toList:()=>p(t),toSet:()=>i,toString:()=>`Set(${Array.from(t).toString()})`};return i},R=e=>g(e);var m=e=>{function t(n){return n!=null&&typeof n[Symbol.iterator]=="function"}let r=Array.isArray(e)?e:t(e)?Array.from(e):[],i=T(r),o={...i,_tag:"List",length:r.length,map:n=>m(r.map(n)),flatMap:n=>m(i.flatMap(n)),remove:n=>{let u=r.indexOf(n);return o.removeAt(u)},contains:n=>r.includes(n),add:n=>m([...r,n]),removeAt:n=>n<0||n>=r.length?o:m([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>m([...r,...n.toArray()]),toList:()=>o,toSet:()=>R(r),toValue:()=>({_tag:"List",value:r}),toString:()=>`List(${G(p(r))})`};return new Proxy(o,{get(n,u){return typeof u=="symbol"||isNaN(Number(u))?n[u]:n.get(Number(u))}})},p=e=>m(e),H=e=>m(e);console.assert(H);import V from"safe-stable-stringify";var O=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>f(t(e)),mapAsync:t=>t(e).then(r=>f(r)).catch(r=>s(r)),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>s(r)),toOption:()=>d(e),toList:()=>p([e]),toString:()=>`Right(${V(e)})`}),K=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>s(e),mapAsync:t=>Promise.resolve(s(e)),flatMap:t=>s(e),flatMapAsync:t=>Promise.resolve(s(e)),toOption:()=>L(),toList:()=>p(),toString:()=>`Left(${V(e)})`}),f=e=>O(e),s=e=>K(e),B=e=>e.isRight(),I=e=>e.isLeft(),Be=(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},J=e=>O(e);console.assert(J);var Q=e=>K(e);console.assert(Q);var xe=async(e,t)=>{try{let r=await e();return f(r)}catch(r){return s(t(r))}};function S(e){return{value:e,map(t){let r=e.then(i=>{if(B(i))try{let o=t(i.value);return f(o)}catch(o){return s(o)}else return s(i.value)});return S(r)},flatMap(t){let r=e.then(i=>{if(B(i))try{return t(i.value).value}catch(o){return Promise.resolve(s(o))}else return Promise.resolve(s(i.value))});return S(r)},mapLeft(t){let r=e.then(i=>{if(I(i))try{let o=t(i.value);return s(o)}catch(o){return s(o)}else return f(i.value)});return S(r)},fold(t,r){return e.then(i=>B(i)?r(i.value):t(i.value))}}}var c=e=>{let t={values:new E(e)},r=()=>Array.from(t.values.entries()).map(([a,l])=>v([a,l])),i=a=>c(new E(t.values).set(a.toArray()[0],a.toArray()[1]).entries()),o=a=>{let l=new E(t.values);return l.delete(a)?c(l.entries()):c(t.values.entries())},n=a=>t.values.get(a[0])===a[1],u=()=>t.values.size,x=a=>c(Array.from(t.values.entries()).map(([l,j])=>[l,a(j)])),P=a=>{let l=c(t.values.entries()).toList();return c(l.flatMap(a).toArray())},q=a=>T(r()).reduce(a),z=a=>T(r()).reduceRight(a),N=a=>l=>T(r()).foldLeft(a)(l),k=a=>l=>T(r()).foldRight(a)(l),F=a=>A(t.values.get(a)),C=(a,l)=>A(t.values.get(a)).getOrElse(l),$=()=>t.values.size===0;return{add:i,remove:o,contains:n,get size(){return u()},map:x,flatMap:P,reduce:q,reduceRight:z,foldLeft:N,foldRight:k,get:F,getOrElse:C,get isEmpty(){return $()},orElse:(a,l)=>A(t.values.get(a)).orElse(l),toList:()=>p(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},Ne=e=>c(e);import M from"safe-stable-stringify";var w=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>w(e),orThrow:t=>e,toEither:()=>f(e),map:t=>W(()=>t(e)),flatMap:t=>t(e),toString:()=>`Success(${M(e)})`}),_=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:()=>s(e),map:t=>_(e),flatMap:t=>_(e),toString:()=>`Failure(${M(e)}))`}),W=e=>{try{return w(e())}catch(t){return _(t instanceof Error?t:new Error(String(t)))}};import X from"safe-stable-stringify";var d=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,orElse:()=>d(e),map:t=>d(t(e)),filter(t){return t(e)?d(e):h},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:()=>p([e]),contains:t=>t===e,size:1,toEither:t=>f(e),toString:()=>`Some(${X(e)})`,toValue:()=>({_tag:"Some",value:e})}),h={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,orElse:e=>e,map:e=>h,filter(e){return h},flatMap:e=>h,reduce:()=>{},reduceRight:()=>{},foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0})},L=()=>h,A=e=>e!=null?d(e):L();export{d as a,L as b,A as c,y as d,T as e,R as f,p as g,H as h,f as i,s as j,B as k,I as l,Be as m,J as n,Q as o,xe as p,S as q,Ne as r,W as s};
@@ -1,4 +1,4 @@
1
- export { d as Collection, C as Converters } from '../index-CLb1bm75.mjs';
1
+ export { d as Collection, C as Converters } from '../index-BWBqO3Kp.mjs';
2
2
  import '../functor/index.mjs';
3
3
  import '../identity/Identity.mjs';
4
4
  import '../tuple/Tuple.mjs';
@@ -1,4 +1,4 @@
1
- export { d as Collection, C as Converters } from '../index-DO4eHo7t.js';
1
+ export { d as Collection, C as Converters } from '../index-DQD4k2t3.js';
2
2
  import '../functor/index.js';
3
3
  import '../identity/Identity.js';
4
4
  import '../tuple/Tuple.js';
@@ -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-CLb1bm75.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-BWBqO3Kp.mjs';
3
3
  import '../typeable/Typeable.mjs';
4
4
  import '../identity/Identity.mjs';
5
5
  import '../tuple/Tuple.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-DO4eHo7t.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-DQD4k2t3.js';
3
3
  import '../typeable/Typeable.js';
4
4
  import '../identity/Identity.js';
5
5
  import '../tuple/Tuple.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');exports.Left = _chunkSZOZHGAQjs.j; exports.Right = _chunkSZOZHGAQjs.i; exports.TypeCheckLeft = _chunkSZOZHGAQjs.o; exports.TypeCheckRight = _chunkSZOZHGAQjs.n; exports.isLeft = _chunkSZOZHGAQjs.l; exports.isRight = _chunkSZOZHGAQjs.k; exports.tryCatch = _chunkSZOZHGAQjs.m; exports.tryCatchAsync = _chunkSZOZHGAQjs.p;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Left = _chunkHGAOWVBIjs.j; exports.Right = _chunkHGAOWVBIjs.i; exports.TypeCheckLeft = _chunkHGAOWVBIjs.o; exports.TypeCheckRight = _chunkHGAOWVBIjs.n; exports.isLeft = _chunkHGAOWVBIjs.l; exports.isRight = _chunkHGAOWVBIjs.k; exports.tryCatch = _chunkHGAOWVBIjs.m; exports.tryCatchAsync = _chunkHGAOWVBIjs.p;
@@ -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}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";export{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{i as a,j as b,k as c,l as d,m as e,n as f,o as g,p as h}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{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,4 +1,4 @@
1
- export { l as EitherT } from '../index-CLb1bm75.mjs';
1
+ export { l as EitherT } from '../index-BWBqO3Kp.mjs';
2
2
  import '../functor/index.mjs';
3
3
  import '../identity/Identity.mjs';
4
4
  import '../tuple/Tuple.mjs';
@@ -1,4 +1,4 @@
1
- export { l as EitherT } from '../index-DO4eHo7t.js';
1
+ export { l as EitherT } from '../index-DQD4k2t3.js';
2
2
  import '../functor/index.js';
3
3
  import '../identity/Identity.js';
4
4
  import '../tuple/Tuple.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');exports.EitherT = _chunkSZOZHGAQjs.q;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.EitherT = _chunkHGAOWVBIjs.q;
@@ -1 +1 @@
1
- import{q as a}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";export{a as EitherT};
1
+ import{q as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as EitherT};
@@ -22,12 +22,12 @@ type Option<T extends Type> = {
22
22
  toList(): List<T>;
23
23
  contains(value: T): boolean;
24
24
  size: number;
25
- valueOf(): {
26
- _tag: "Some" | "None";
27
- value?: T;
28
- };
29
25
  toEither<E>(left: E): Either<E, T>;
30
26
  toString(): string;
27
+ toValue(): {
28
+ _tag: "Some" | "None";
29
+ value: T;
30
+ };
31
31
  } & (Traversable<T> & Functor<T> & Typeable<"Some" | "None">);
32
32
  declare const Option: <T extends Type>(value: T | null | undefined) => Option<T>;
33
33
 
@@ -52,11 +52,12 @@ type Seq<A> = {
52
52
  reduceRight: (f: (prev: A, curr: A) => A) => A;
53
53
  foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
54
54
  foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
55
- valueOf: () => {
56
- values: A[];
57
- };
58
55
  toString: () => string;
59
- } & _Iterable_<A>;
56
+ toValue: () => {
57
+ _tag: string;
58
+ value: A[];
59
+ };
60
+ } & _Iterable_<A> & Typeable<"Seq">;
60
61
  declare const Seq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
61
62
 
62
63
  type _Iterable_<A extends Type> = {
@@ -112,11 +113,11 @@ type List<A> = {
112
113
  toList: () => List<A>;
113
114
  toSet: () => Set<A>;
114
115
  toString: () => string;
115
- valueOf: () => {
116
+ toValue: () => {
116
117
  _tag: string;
117
- values: A[];
118
+ value: A[];
118
119
  };
119
- } & Typeable<"List"> & Seq<A>;
120
+ } & Seq<A> & Typeable<"List">;
120
121
  declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
121
122
  declare const TestList: <A>(values?: Iterable<A> | _Iterable_<A>) => InternalList<A>;
122
123
 
@@ -133,10 +134,6 @@ type Either<L extends Type, R extends Type> = {
133
134
  flatMapAsync: <U extends Type>(f: (value: R) => Promise<Either<L, U>>) => Promise<Either<L, U>>;
134
135
  toOption: () => Option<R>;
135
136
  toList: () => List<R>;
136
- valueOf: () => {
137
- _tag: "Left" | "Right";
138
- value: L | R;
139
- };
140
137
  toString: () => string;
141
138
  } & Typeable<"Left" | "Right">;
142
139
  type TestEither<L extends Type, R extends Type> = Either<L, R> & Functor<R>;
@@ -187,11 +184,6 @@ type Try<T> = {
187
184
  toEither: () => Either<Error, T>;
188
185
  map: <U>(f: (value: T) => U) => Try<U>;
189
186
  flatMap: <U>(f: (value: T) => Try<U>) => Try<U>;
190
- valueOf: () => {
191
- _tag: "Success" | "Failure";
192
- value?: T;
193
- error?: Error;
194
- };
195
187
  toString: () => string;
196
188
  } & Typeable<"Success" | "Failure">;
197
189
  declare const Try: <T>(f: () => T) => Try<T>;
@@ -22,12 +22,12 @@ type Option<T extends Type> = {
22
22
  toList(): List<T>;
23
23
  contains(value: T): boolean;
24
24
  size: number;
25
- valueOf(): {
26
- _tag: "Some" | "None";
27
- value?: T;
28
- };
29
25
  toEither<E>(left: E): Either<E, T>;
30
26
  toString(): string;
27
+ toValue(): {
28
+ _tag: "Some" | "None";
29
+ value: T;
30
+ };
31
31
  } & (Traversable<T> & Functor<T> & Typeable<"Some" | "None">);
32
32
  declare const Option: <T extends Type>(value: T | null | undefined) => Option<T>;
33
33
 
@@ -52,11 +52,12 @@ type Seq<A> = {
52
52
  reduceRight: (f: (prev: A, curr: A) => A) => A;
53
53
  foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
54
54
  foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
55
- valueOf: () => {
56
- values: A[];
57
- };
58
55
  toString: () => string;
59
- } & _Iterable_<A>;
56
+ toValue: () => {
57
+ _tag: string;
58
+ value: A[];
59
+ };
60
+ } & _Iterable_<A> & Typeable<"Seq">;
60
61
  declare const Seq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
61
62
 
62
63
  type _Iterable_<A extends Type> = {
@@ -112,11 +113,11 @@ type List<A> = {
112
113
  toList: () => List<A>;
113
114
  toSet: () => Set<A>;
114
115
  toString: () => string;
115
- valueOf: () => {
116
+ toValue: () => {
116
117
  _tag: string;
117
- values: A[];
118
+ value: A[];
118
119
  };
119
- } & Typeable<"List"> & Seq<A>;
120
+ } & Seq<A> & Typeable<"List">;
120
121
  declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
121
122
  declare const TestList: <A>(values?: Iterable<A> | _Iterable_<A>) => InternalList<A>;
122
123
 
@@ -133,10 +134,6 @@ type Either<L extends Type, R extends Type> = {
133
134
  flatMapAsync: <U extends Type>(f: (value: R) => Promise<Either<L, U>>) => Promise<Either<L, U>>;
134
135
  toOption: () => Option<R>;
135
136
  toList: () => List<R>;
136
- valueOf: () => {
137
- _tag: "Left" | "Right";
138
- value: L | R;
139
- };
140
137
  toString: () => string;
141
138
  } & Typeable<"Left" | "Right">;
142
139
  type TestEither<L extends Type, R extends Type> = Either<L, R> & Functor<R>;
@@ -187,11 +184,6 @@ type Try<T> = {
187
184
  toEither: () => Either<Error, T>;
188
185
  map: <U>(f: (value: T) => U) => Try<U>;
189
186
  flatMap: <U>(f: (value: T) => Try<U>) => Try<U>;
190
- valueOf: () => {
191
- _tag: "Success" | "Failure";
192
- value?: T;
193
- error?: Error;
194
- };
195
187
  toString: () => string;
196
188
  } & Typeable<"Success" | "Failure">;
197
189
  declare const Try: <T>(f: () => T) => Try<T>;
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { AbstractFunctor, ArrayFunctor, ArrayType, Functor, SingleType, Type } from './functor/index.mjs';
2
- export { E as Either, l as EitherT, 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, e as TestEither, T as TestList, n as Traversable, m as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-CLb1bm75.mjs';
2
+ export { E as Either, l as EitherT, 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, e as TestEither, T as TestList, n as Traversable, m as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-BWBqO3Kp.mjs';
3
3
  export { Identity } from './identity/Identity.mjs';
4
4
  export { Tuple } from './tuple/Tuple.mjs';
5
5
  export { Typeable } from './typeable/Typeable.mjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { AbstractFunctor, ArrayFunctor, ArrayType, Functor, SingleType, Type } from './functor/index.js';
2
- export { E as Either, l as EitherT, 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, e as TestEither, T as TestList, n as Traversable, m as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-DO4eHo7t.js';
2
+ export { E as Either, l as EitherT, 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, e as TestEither, T as TestList, n as Traversable, m as Try, j as TypeCheckLeft, h as TypeCheckRight, _ as _Iterable_, g as isLeft, i as isRight, t as tryCatch, k as tryCatchAsync } from './index-DQD4k2t3.js';
3
3
  export { Identity } from './identity/Identity.js';
4
4
  export { Tuple } from './tuple/Tuple.js';
5
5
  export { Typeable } from './typeable/Typeable.js';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('./chunk-SZOZHGAQ.js');require('./chunk-3VJERXBP.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');require('./chunk-BNNK42JC.js');var _chunk5O6YELD3js = require('./chunk-5O6YELD3.js');require('./chunk-K3EKBPQE.js');require('./chunk-5VTXJIR3.js');require('./chunk-XORABVON.js');exports.EitherT = _chunkSZOZHGAQjs.q; exports.Left = _chunkSZOZHGAQjs.j; exports.List = _chunkSZOZHGAQjs.g; exports.Map = _chunkSZOZHGAQjs.r; exports.None = _chunkSZOZHGAQjs.b; exports.Option = _chunkSZOZHGAQjs.c; exports.Right = _chunkSZOZHGAQjs.i; exports.Seq = _chunkSZOZHGAQjs.e; exports.Set = _chunkSZOZHGAQjs.f; exports.Some = _chunkSZOZHGAQjs.a; exports.TestList = _chunkSZOZHGAQjs.h; exports.Try = _chunkSZOZHGAQjs.s; exports.Tuple = _chunkOXLZ6UIZjs.a; exports.TypeCheckLeft = _chunkSZOZHGAQjs.o; exports.TypeCheckRight = _chunkSZOZHGAQjs.n; exports.Typeable = _chunk5O6YELD3js.a; exports.isLeft = _chunkSZOZHGAQjs.l; exports.isRight = _chunkSZOZHGAQjs.k; exports.tryCatch = _chunkSZOZHGAQjs.m; exports.tryCatchAsync = _chunkSZOZHGAQjs.p;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('./chunk-HGAOWVBI.js');require('./chunk-3VJERXBP.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var _chunk5O6YELD3js = require('./chunk-5O6YELD3.js');require('./chunk-BNNK42JC.js');require('./chunk-5VTXJIR3.js');require('./chunk-XORABVON.js');require('./chunk-K3EKBPQE.js');exports.EitherT = _chunkHGAOWVBIjs.q; exports.Left = _chunkHGAOWVBIjs.j; exports.List = _chunkHGAOWVBIjs.g; exports.Map = _chunkHGAOWVBIjs.r; exports.None = _chunkHGAOWVBIjs.b; exports.Option = _chunkHGAOWVBIjs.c; exports.Right = _chunkHGAOWVBIjs.i; exports.Seq = _chunkHGAOWVBIjs.e; exports.Set = _chunkHGAOWVBIjs.f; exports.Some = _chunkHGAOWVBIjs.a; exports.TestList = _chunkHGAOWVBIjs.h; exports.Try = _chunkHGAOWVBIjs.s; exports.Tuple = _chunkOXLZ6UIZjs.a; exports.TypeCheckLeft = _chunkHGAOWVBIjs.o; exports.TypeCheckRight = _chunkHGAOWVBIjs.n; exports.Typeable = _chunk5O6YELD3js.a; exports.isLeft = _chunkHGAOWVBIjs.l; exports.isRight = _chunkHGAOWVBIjs.k; exports.tryCatch = _chunkHGAOWVBIjs.m; exports.tryCatchAsync = _chunkHGAOWVBIjs.p;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{a,b,c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r,s}from"./chunk-TF4ZCVID.mjs";import"./chunk-HA5XD5KC.mjs";import{a as q}from"./chunk-2I2NKDFN.mjs";import"./chunk-RRAIFS3D.mjs";import{a as t}from"./chunk-V7DKESTM.mjs";import"./chunk-2ML63TYF.mjs";import"./chunk-377WQNCB.mjs";import"./chunk-V2J3R5IU.mjs";export{p as EitherT,i as Left,f as List,r as Map,b as None,c as Option,h as Right,d as Seq,e as Set,a as Some,g as TestList,s as Try,q as Tuple,n as TypeCheckLeft,m as TypeCheckRight,t as Typeable,k as isLeft,j as isRight,l as tryCatch,o as tryCatchAsync};
1
+ import{a,b,c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r,s}from"./chunk-NJJ3CNH5.mjs";import"./chunk-HA5XD5KC.mjs";import{a as q}from"./chunk-2I2NKDFN.mjs";import{a as t}from"./chunk-V7DKESTM.mjs";import"./chunk-RRAIFS3D.mjs";import"./chunk-377WQNCB.mjs";import"./chunk-V2J3R5IU.mjs";import"./chunk-2ML63TYF.mjs";export{p as EitherT,i as Left,f as List,r as Map,b as None,c as Option,h as Right,d as Seq,e as Set,a as Some,g as TestList,s as Try,q as Tuple,n as TypeCheckLeft,m as TypeCheckRight,t as Typeable,k as isLeft,j as isRight,l as tryCatch,o as tryCatchAsync};
@@ -1,5 +1,5 @@
1
- export { a as Seq, c as createSeq } from '../index-CLb1bm75.mjs';
1
+ export { a as Seq, c as createSeq } from '../index-BWBqO3Kp.mjs';
2
+ import '../typeable/Typeable.mjs';
2
3
  import '../functor/index.mjs';
3
4
  import '../identity/Identity.mjs';
4
5
  import '../tuple/Tuple.mjs';
5
- import '../typeable/Typeable.mjs';
@@ -1,5 +1,5 @@
1
- export { a as Seq, c as createSeq } from '../index-DO4eHo7t.js';
1
+ export { a as Seq, c as createSeq } from '../index-DQD4k2t3.js';
2
+ import '../typeable/Typeable.js';
2
3
  import '../functor/index.js';
3
4
  import '../identity/Identity.js';
4
5
  import '../tuple/Tuple.js';
5
- import '../typeable/Typeable.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');exports.Seq = _chunkSZOZHGAQjs.e; exports.createSeq = _chunkSZOZHGAQjs.d;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Seq = _chunkHGAOWVBIjs.e; exports.createSeq = _chunkHGAOWVBIjs.d;
@@ -1 +1 @@
1
- import{d as a,e as b}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";export{b as Seq,a as createSeq};
1
+ import{d as a,e as b}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{b as Seq,a as createSeq};
@@ -1,5 +1,5 @@
1
1
  import '../functor/index.mjs';
2
- export { a as Seq, _ as _Iterable_ } from '../index-CLb1bm75.mjs';
2
+ export { a as Seq, _ as _Iterable_ } from '../index-BWBqO3Kp.mjs';
3
3
  import '../identity/Identity.mjs';
4
4
  import '../tuple/Tuple.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-DO4eHo7t.js';
2
+ export { a as Seq, _ as _Iterable_ } from '../index-DQD4k2t3.js';
3
3
  import '../identity/Identity.js';
4
4
  import '../tuple/Tuple.js';
5
5
  import '../typeable/Typeable.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');exports.Seq = _chunkSZOZHGAQjs.e;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Seq = _chunkHGAOWVBIjs.e;
@@ -1 +1 @@
1
- import{e as a}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";export{a as Seq};
1
+ import{e as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Seq};
@@ -1,4 +1,4 @@
1
- export { L as List, T as TestList } from '../index-CLb1bm75.mjs';
1
+ export { L as List, T as TestList } from '../index-BWBqO3Kp.mjs';
2
2
  import '../typeable/Typeable.mjs';
3
3
  import '../functor/index.mjs';
4
4
  import '../identity/Identity.mjs';
@@ -1,4 +1,4 @@
1
- export { L as List, T as TestList } from '../index-DO4eHo7t.js';
1
+ export { L as List, T as TestList } from '../index-DQD4k2t3.js';
2
2
  import '../typeable/Typeable.js';
3
3
  import '../functor/index.js';
4
4
  import '../identity/Identity.js';
package/dist/list/List.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');exports.List = _chunkSZOZHGAQjs.g; exports.TestList = _chunkSZOZHGAQjs.h;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.List = _chunkHGAOWVBIjs.g; exports.TestList = _chunkHGAOWVBIjs.h;
@@ -1 +1 @@
1
- import{g as a,h as b}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";export{a as List,b as TestList};
1
+ import{g as a,h as b}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as List,b as TestList};
@@ -1,4 +1,4 @@
1
- export { M as Map } from '../index-CLb1bm75.mjs';
1
+ export { M as Map } from '../index-BWBqO3Kp.mjs';
2
2
  import '../tuple/Tuple.mjs';
3
3
  import '../functor/index.mjs';
4
4
  import '../identity/Identity.mjs';
package/dist/map/Map.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { M as Map } from '../index-DO4eHo7t.js';
1
+ export { M as Map } from '../index-DQD4k2t3.js';
2
2
  import '../tuple/Tuple.js';
3
3
  import '../functor/index.js';
4
4
  import '../identity/Identity.js';
package/dist/map/Map.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');exports.Map = _chunkSZOZHGAQjs.r;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Map = _chunkHGAOWVBIjs.r;
package/dist/map/Map.mjs CHANGED
@@ -1 +1 @@
1
- import{r as a}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";export{a as Map};
1
+ import{r as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Map};
@@ -1,5 +1,5 @@
1
1
  import '../functor/index.mjs';
2
- export { N as None, O as Option, S as Some } from '../index-CLb1bm75.mjs';
2
+ export { N as None, O as Option, S as Some } from '../index-BWBqO3Kp.mjs';
3
3
  import '../typeable/Typeable.mjs';
4
4
  import '../identity/Identity.mjs';
5
5
  import '../tuple/Tuple.mjs';
@@ -1,5 +1,5 @@
1
1
  import '../functor/index.js';
2
- export { N as None, O as Option, S as Some } from '../index-DO4eHo7t.js';
2
+ export { N as None, O as Option, S as Some } from '../index-DQD4k2t3.js';
3
3
  import '../typeable/Typeable.js';
4
4
  import '../identity/Identity.js';
5
5
  import '../tuple/Tuple.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');exports.None = _chunkSZOZHGAQjs.b; exports.Option = _chunkSZOZHGAQjs.c; exports.Some = _chunkSZOZHGAQjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.None = _chunkHGAOWVBIjs.b; exports.Option = _chunkHGAOWVBIjs.c; exports.Some = _chunkHGAOWVBIjs.a;
@@ -1 +1 @@
1
- import{a,b,c}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";export{b as None,c as Option,a as Some};
1
+ import{a,b,c}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{b as None,c as Option,a as Some};
@@ -1,4 +1,4 @@
1
- export { b as Set } from '../index-CLb1bm75.mjs';
1
+ export { b as Set } from '../index-BWBqO3Kp.mjs';
2
2
  import '../functor/index.mjs';
3
3
  import '../identity/Identity.mjs';
4
4
  import '../tuple/Tuple.mjs';
package/dist/set/Set.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { b as Set } from '../index-DO4eHo7t.js';
1
+ export { b as Set } from '../index-DQD4k2t3.js';
2
2
  import '../functor/index.js';
3
3
  import '../identity/Identity.js';
4
4
  import '../tuple/Tuple.js';
package/dist/set/Set.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');exports.Set = _chunkSZOZHGAQjs.f;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Set = _chunkHGAOWVBIjs.f;
package/dist/set/Set.mjs CHANGED
@@ -1 +1 @@
1
- import{f as a}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";export{a as Set};
1
+ import{f as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Set};
@@ -1,4 +1,4 @@
1
- export { m as Try } from '../index-CLb1bm75.mjs';
1
+ export { m as Try } from '../index-BWBqO3Kp.mjs';
2
2
  import '../typeable/Typeable.mjs';
3
3
  import '../functor/index.mjs';
4
4
  import '../identity/Identity.mjs';
package/dist/try/Try.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { m as Try } from '../index-DO4eHo7t.js';
1
+ export { m as Try } from '../index-DQD4k2t3.js';
2
2
  import '../typeable/Typeable.js';
3
3
  import '../functor/index.js';
4
4
  import '../identity/Identity.js';
package/dist/try/Try.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');exports.Try = _chunkSZOZHGAQjs.s;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Try = _chunkHGAOWVBIjs.s;
package/dist/try/Try.mjs CHANGED
@@ -1 +1 @@
1
- import{s as a}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";export{a as Try};
1
+ import{s as a}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Try};
@@ -1,6 +1,6 @@
1
- declare function Typeable<T extends string>(type: T): {
2
- readonly _tag: T;
1
+ declare function Typeable(type: string): {
2
+ readonly _tag: string;
3
3
  };
4
- type Typeable<T extends string> = ReturnType<typeof Typeable<T>>;
4
+ type Typeable<T extends string> = ReturnType<typeof Typeable>;
5
5
 
6
6
  export { Typeable };
@@ -1,6 +1,6 @@
1
- declare function Typeable<T extends string>(type: T): {
2
- readonly _tag: T;
1
+ declare function Typeable(type: string): {
2
+ readonly _tag: string;
3
3
  };
4
- type Typeable<T extends string> = ReturnType<typeof Typeable<T>>;
4
+ type Typeable<T extends string> = ReturnType<typeof Typeable>;
5
5
 
6
6
  export { Typeable };
@@ -1,4 +1,4 @@
1
- import { E as Either } from '../index-CLb1bm75.mjs';
1
+ import { E as Either } from '../index-BWBqO3Kp.mjs';
2
2
  import { ParseError } from '../error/ParseError.mjs';
3
3
  import '../functor/index.mjs';
4
4
  import '../identity/Identity.mjs';
@@ -1,4 +1,4 @@
1
- import { E as Either } from '../index-DO4eHo7t.js';
1
+ import { E as Either } from '../index-DQD4k2t3.js';
2
2
  import { ParseError } from '../error/ParseError.js';
3
3
  import '../functor/index.js';
4
4
  import '../identity/Identity.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkE6RS47F7js = require('../chunk-E6RS47F7.js');var _chunkSZOZHGAQjs = require('../chunk-SZOZHGAQ.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-BNNK42JC.js');require('../chunk-5O6YELD3.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');var a=o=>{let r=parseInt(o,10);return isNaN(r)?_chunkSZOZHGAQjs.j.call(void 0, _chunkE6RS47F7js.a.call(void 0, `${r}`)):_chunkSZOZHGAQjs.i.call(void 0, r)};exports.parseNumber = a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkE6RS47F7js = require('../chunk-E6RS47F7.js');var _chunkHGAOWVBIjs = require('../chunk-HGAOWVBI.js');require('../chunk-3VJERXBP.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');var a=o=>{let r=parseInt(o,10);return isNaN(r)?_chunkHGAOWVBIjs.j.call(void 0, _chunkE6RS47F7js.a.call(void 0, `${r}`)):_chunkHGAOWVBIjs.i.call(void 0, r)};exports.parseNumber = a;
@@ -1 +1 @@
1
- import{a as s}from"../chunk-VK5GL6NM.mjs";import{i as e,j as t}from"../chunk-TF4ZCVID.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";var a=o=>{let r=parseInt(o,10);return isNaN(r)?t(s(`${r}`)):e(r)};export{a as parseNumber};
1
+ import{a as s}from"../chunk-VK5GL6NM.mjs";import{i as e,j as t}from"../chunk-NJJ3CNH5.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";var a=o=>{let r=parseInt(o,10);return isNaN(r)?t(s(`${r}`)):e(r)};export{a as parseNumber};
@@ -0,0 +1,10 @@
1
+ import { Either } from "./Either";
2
+ export declare class AsyncEither<L, R> {
3
+ private readonly promise;
4
+ constructor(promise: Promise<Either<L, R>>);
5
+ static fromEither<L, R>(either: Either<L, R>): AsyncEither<L, R>;
6
+ static liftPromise<L, R>(promise: Promise<R>): AsyncEither<L, R>;
7
+ map<U>(f: (value: R) => U): AsyncEither<L, U>;
8
+ flatMap<U>(f: (value: R) => AsyncEither<L, U>): AsyncEither<L, U>;
9
+ toPromise(): Promise<Either<L, R>>;
10
+ }
@@ -15,10 +15,6 @@ export type Either<L extends Type, R extends Type> = {
15
15
  flatMapAsync: <U extends Type>(f: (value: R) => Promise<Either<L, U>>) => Promise<Either<L, U>>;
16
16
  toOption: () => Option<R>;
17
17
  toList: () => List<R>;
18
- valueOf: () => {
19
- _tag: "Left" | "Right";
20
- value: L | R;
21
- };
22
18
  toString: () => string;
23
19
  } & Typeable<"Left" | "Right">;
24
20
  export type TestEither<L extends Type, R extends Type> = Either<L, R> & Functor<R>;
@@ -1,4 +1,5 @@
1
1
  import { Option } from "../option/Option";
2
+ import { Typeable } from "../typeable/Typeable";
2
3
  import { _Iterable_ } from "./index";
3
4
  export type Seq<A> = {
4
5
  readonly length: number;
@@ -20,10 +21,11 @@ export type Seq<A> = {
20
21
  reduceRight: (f: (prev: A, curr: A) => A) => A;
21
22
  foldLeft: <B>(z: B) => (op: (b: B, a: A) => B) => B;
22
23
  foldRight: <B>(z: B) => (op: (a: A, b: B) => B) => B;
23
- valueOf: () => {
24
- values: A[];
25
- };
26
24
  toString: () => string;
27
- } & _Iterable_<A>;
25
+ toValue: () => {
26
+ _tag: string;
27
+ value: A[];
28
+ };
29
+ } & _Iterable_<A> & Typeable<"Seq">;
28
30
  export declare const createSeq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
29
31
  export declare const Seq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
@@ -15,11 +15,11 @@ export type List<A> = {
15
15
  toList: () => List<A>;
16
16
  toSet: () => Set<A>;
17
17
  toString: () => string;
18
- valueOf: () => {
18
+ toValue: () => {
19
19
  _tag: string;
20
- values: A[];
20
+ value: A[];
21
21
  };
22
- } & Typeable<"List"> & Seq<A>;
22
+ } & Seq<A> & Typeable<"List">;
23
23
  type InternalList<A> = List<A> & ArrayLike<A> & _Iterable_<A> & Collection<A>;
24
24
  export declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
25
25
  export declare const TestList: <A>(values?: Iterable<A> | _Iterable_<A>) => InternalList<A>;
@@ -18,12 +18,12 @@ export type Option<T extends Type> = {
18
18
  toList(): List<T>;
19
19
  contains(value: T): boolean;
20
20
  size: number;
21
- valueOf(): {
22
- _tag: "Some" | "None";
23
- value?: T;
24
- };
25
21
  toEither<E>(left: E): Either<E, T>;
26
22
  toString(): string;
23
+ toValue(): {
24
+ _tag: "Some" | "None";
25
+ value: T;
26
+ };
27
27
  } & (Traversable<T> & Functor<T> & Typeable<"Some" | "None">);
28
28
  export declare const Some: <T extends Type>(value: T) => Option<T>;
29
29
  export declare const None: <T extends Type>() => Option<T>;
package/lib/try/Try.d.ts CHANGED
@@ -13,11 +13,6 @@ export type Try<T> = {
13
13
  toEither: () => Either<Error, T>;
14
14
  map: <U>(f: (value: T) => U) => Try<U>;
15
15
  flatMap: <U>(f: (value: T) => Try<U>) => Try<U>;
16
- valueOf: () => {
17
- _tag: "Success" | "Failure";
18
- value?: T;
19
- error?: Error;
20
- };
21
16
  toString: () => string;
22
17
  } & Typeable<"Success" | "Failure">;
23
18
  export declare const Try: <T>(f: () => T) => Try<T>;
@@ -1,4 +1,4 @@
1
- export declare function Typeable<T extends string>(type: T): {
2
- readonly _tag: T;
1
+ export declare function Typeable(type: string): {
2
+ readonly _tag: string;
3
3
  };
4
- export type Typeable<T extends string> = ReturnType<typeof Typeable<T>>;
4
+ export type Typeable<T extends string> = ReturnType<typeof Typeable>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functype",
3
- "version": "0.8.24",
3
+ "version": "0.8.26",
4
4
  "description": "A smallish functional library for TypeScript",
5
5
  "author": "jordan.burke@gmail.com",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk3VJERXBPjs = require('./chunk-3VJERXBP.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var _chunkBNNK42JCjs = require('./chunk-BNNK42JC.js');var _chunk5VTXJIR3js = require('./chunk-5VTXJIR3.js');var _safestablestringify = require('safe-stable-stringify'); var _safestablestringify2 = _interopRequireDefault(_safestablestringify);var d=e=>{let t=_chunkBNNK42JCjs.a.call(void 0, e)?e:e instanceof Object&&"toArray"in e?e.toArray():[],r=Array.from(t);return{[Symbol.iterator]:()=>r[Symbol.iterator](),get length(){return r.length},map:o=>d(r.map(o)),flatMap:o=>d(r.flatMap(a=>o(a).toArray())),forEach:o=>r.forEach(o),count:o=>r.filter(o).length,exists:o=>r.some(o),filter:o=>d(r.filter(o)),filterNot:o=>d(r.filter(a=>!o(a))),find:o=>A(r.find(o)),get head(){return r[0]},get headOption(){return r.length>0?A(r[0]):y()},get isEmpty(){return r.length===0},get size(){return r.length},toArray:()=>[...r],reduce:o=>r.reduce(o),reduceRight:o=>r.reduceRight(o),foldLeft:o=>a=>r.reduce(a,o),foldRight:o=>a=>r.reduceRight((n,f)=>a(f,n),o),valueOf:()=>({values:r}),toString:()=>`Seq(${_safestablestringify2.default.call(void 0, e)})`}},u= exports.e =e=>d(e);var g=e=>{let t=_chunkBNNK42JCjs.a.call(void 0, e)?new (0, _chunk3VJERXBPjs.a)(e):new (0, _chunk3VJERXBPjs.a)(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _2 => _2.toArray, 'call', _3 => _3()]), () => ([]))),r=u(t),o={...r,add:a=>g([...t,a]),remove:a=>{let n=new (0, _chunk3VJERXBPjs.a)(t);return n.delete(a),g(n)},contains:a=>t.has(a),has:a=>t.has(a),map:a=>g(r.map(a)),flatMap:a=>g(r.flatMap(a)),toList:()=>T(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},R= exports.f =e=>g(e);var c=e=>{function t(n){return n!=null&&typeof n[Symbol.iterator]=="function"}let r=Array.isArray(e)?e:t(e)?Array.from(e):[],o=u(r),a={...o,_tag:"List",length:r.length,map:n=>c(r.map(n)),flatMap:n=>c(o.flatMap(n)),remove:n=>{let f=r.indexOf(n);return a.removeAt(f)},contains:n=>r.includes(n),add:n=>c([...r,n]),removeAt:n=>n<0||n>=r.length?a:c([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>c([...r,...n.toArray()]),toList:()=>a,toSet:()=>R(r),toString:()=>`List(${_safestablestringify2.default.call(void 0, e)})`,valueOf:()=>({_tag:"List",values:r})};return new Proxy(a,{get(n,f){return typeof f=="symbol"||isNaN(Number(f))?n[f]:n.get(Number(f))}})},T= exports.g =e=>c(e),G= exports.h =e=>c(e);console.assert(G);var O=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>p(t(e)),mapAsync:t=>t(e).then(r=>p(r)).catch(r=>s(r)),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>s(r)),toOption:()=>L(e),toList:()=>T([e]),valueOf:()=>({_tag:"Right",value:e}),toString:()=>`Right(${_safestablestringify2.default.call(void 0, e)})`}),V=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>s(e),mapAsync:t=>Promise.resolve(s(e)),flatMap:t=>s(e),flatMapAsync:t=>Promise.resolve(s(e)),toOption:()=>y(),toList:()=>T(),valueOf:()=>({_tag:"Left",value:e}),toString:()=>`Left(${_safestablestringify2.default.call(void 0, e)})`}),p= exports.i =e=>O(e),s= exports.j =e=>V(e),B= exports.k =e=>e.isRight(),K= exports.l =e=>e.isLeft(),Be= exports.m =(e,t)=>{try{return p(e())}catch(r){return s(t(r))}},H= exports.n =e=>O(e);console.assert(H);var J=e=>V(e);console.assert(J);var xe=async(e,t)=>{try{let r=await e();return p(r)}catch(r){return s(t(r))}};function x(e){return{value:e,map(t){let r=e.then(o=>{if(B(o))try{let a=t(o.value);return p(a)}catch(a){return s(a)}else return s(o.value)});return x(r)},flatMap(t){let r=e.then(o=>{if(B(o))try{return t(o.value).value}catch(a){return Promise.resolve(s(a))}else return Promise.resolve(s(o.value))});return x(r)},mapLeft(t){let r=e.then(o=>{if(K(o))try{let a=t(o.value);return s(a)}catch(a){return s(a)}else return p(o.value)});return x(r)},fold(t,r){return e.then(o=>B(o)?r(o.value):t(o.value))}}}var m=e=>{let t={values:new (0, _chunk5VTXJIR3js.a)(e)},r=()=>Array.from(t.values.entries()).map(([i,l])=>_chunkOXLZ6UIZjs.a.call(void 0, [i,l])),o=i=>m(new (0, _chunk5VTXJIR3js.a)(t.values).set(i.toArray()[0],i.toArray()[1]).entries()),a=i=>{let l=new (0, _chunk5VTXJIR3js.a)(t.values);return l.delete(i)?m(l.entries()):m(t.values.entries())},n=i=>t.values.get(i[0])===i[1],f=()=>t.values.size,M=i=>m(Array.from(t.values.entries()).map(([l,$])=>[l,i($)])),w=i=>{let l=m(t.values.entries()).toList();return m(l.flatMap(i).toArray())},P=i=>u(r()).reduce(i),q=i=>u(r()).reduceRight(i),z=i=>l=>u(r()).foldLeft(i)(l),N=i=>l=>u(r()).foldRight(i)(l),F=i=>A(t.values.get(i)),k=(i,l)=>A(t.values.get(i)).getOrElse(l),C=()=>t.values.size===0;return{add:o,remove:a,contains:n,get size(){return f()},map:M,flatMap:w,reduce:P,reduceRight:q,foldLeft:z,foldRight:N,get:F,getOrElse:k,get isEmpty(){return C()},orElse:(i,l)=>A(t.values.get(i)).orElse(l),toList:()=>T(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},Ne= exports.r =e=>m(e);var I=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>I(e),orThrow:t=>e,toEither:()=>p(e),map:t=>W(()=>t(e)),flatMap:t=>t(e),valueOf:()=>({_tag:"Success",value:e}),toString:()=>`Success(${_safestablestringify2.default.call(void 0, e)})`}),S=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:()=>s(e),map:t=>S(e),flatMap:t=>S(e),valueOf:()=>({_tag:"Failure",error:e}),toString:()=>`Failure(${e.message})`}),W= exports.s =e=>{try{return I(e())}catch(t){return S(t instanceof Error?t:new Error(String(t)))}};var L=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,orElse:()=>L(e),map:t=>L(t(e)),filter(t){return t(e)?L(e):h},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:()=>T([e]),contains:t=>t===e,size:1,toEither:t=>p(e),toString:()=>`Some(${_safestablestringify2.default.call(void 0, e)})`,valueOf:()=>({_tag:"Some",value:e})}),h={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,orElse:e=>e,map:e=>h,filter(e){return h},flatMap:e=>h,reduce:()=>{},reduceRight:()=>{},foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>T([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",valueOf:()=>({_tag:"None"})},y= exports.b =()=>h,A= exports.c =e=>e!=null?L(e):y();exports.a = L; exports.b = y; exports.c = A; exports.d = d; exports.e = u; exports.f = R; exports.g = T; exports.h = G; exports.i = p; exports.j = s; exports.k = B; exports.l = K; exports.m = Be; exports.n = H; exports.o = J; exports.p = xe; exports.q = x; exports.r = Ne; exports.s = W;
@@ -1 +0,0 @@
1
- import{a as U}from"./chunk-HA5XD5KC.mjs";import{a as _}from"./chunk-2I2NKDFN.mjs";import{a as b}from"./chunk-RRAIFS3D.mjs";import{a as E}from"./chunk-377WQNCB.mjs";import j from"safe-stable-stringify";var d=e=>{let t=b(e)?e:e instanceof Object&&"toArray"in e?e.toArray():[],r=Array.from(t);return{[Symbol.iterator]:()=>r[Symbol.iterator](),get length(){return r.length},map:o=>d(r.map(o)),flatMap:o=>d(r.flatMap(a=>o(a).toArray())),forEach:o=>r.forEach(o),count:o=>r.filter(o).length,exists:o=>r.some(o),filter:o=>d(r.filter(o)),filterNot:o=>d(r.filter(a=>!o(a))),find:o=>A(r.find(o)),get head(){return r[0]},get headOption(){return r.length>0?A(r[0]):y()},get isEmpty(){return r.length===0},get size(){return r.length},toArray:()=>[...r],reduce:o=>r.reduce(o),reduceRight:o=>r.reduceRight(o),foldLeft:o=>a=>r.reduce(a,o),foldRight:o=>a=>r.reduceRight((n,f)=>a(f,n),o),valueOf:()=>({values:r}),toString:()=>`Seq(${j(e)})`}},u=e=>d(e);var g=e=>{let t=b(e)?new U(e):new U(e?.toArray()??[]),r=u(t),o={...r,add:a=>g([...t,a]),remove:a=>{let n=new U(t);return n.delete(a),g(n)},contains:a=>t.has(a),has:a=>t.has(a),map:a=>g(r.map(a)),flatMap:a=>g(r.flatMap(a)),toList:()=>T(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},R=e=>g(e);import D from"safe-stable-stringify";var c=e=>{function t(n){return n!=null&&typeof n[Symbol.iterator]=="function"}let r=Array.isArray(e)?e:t(e)?Array.from(e):[],o=u(r),a={...o,_tag:"List",length:r.length,map:n=>c(r.map(n)),flatMap:n=>c(o.flatMap(n)),remove:n=>{let f=r.indexOf(n);return a.removeAt(f)},contains:n=>r.includes(n),add:n=>c([...r,n]),removeAt:n=>n<0||n>=r.length?a:c([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>c([...r,...n.toArray()]),toList:()=>a,toSet:()=>R(r),toString:()=>`List(${D(e)})`,valueOf:()=>({_tag:"List",values:r})};return new Proxy(a,{get(n,f){return typeof f=="symbol"||isNaN(Number(f))?n[f]:n.get(Number(f))}})},T=e=>c(e),G=e=>c(e);console.assert(G);import v from"safe-stable-stringify";var O=e=>({_tag:"Right",value:e,isLeft:()=>!1,isRight:()=>!0,getOrElse:t=>e,getOrThrow:()=>e,map:t=>p(t(e)),mapAsync:t=>t(e).then(r=>p(r)).catch(r=>s(r)),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>s(r)),toOption:()=>L(e),toList:()=>T([e]),valueOf:()=>({_tag:"Right",value:e}),toString:()=>`Right(${v(e)})`}),V=e=>({_tag:"Left",value:e,isLeft:()=>!0,isRight:()=>!1,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>s(e),mapAsync:t=>Promise.resolve(s(e)),flatMap:t=>s(e),flatMapAsync:t=>Promise.resolve(s(e)),toOption:()=>y(),toList:()=>T(),valueOf:()=>({_tag:"Left",value:e}),toString:()=>`Left(${v(e)})`}),p=e=>O(e),s=e=>V(e),B=e=>e.isRight(),K=e=>e.isLeft(),Be=(e,t)=>{try{return p(e())}catch(r){return s(t(r))}},H=e=>O(e);console.assert(H);var J=e=>V(e);console.assert(J);var xe=async(e,t)=>{try{let r=await e();return p(r)}catch(r){return s(t(r))}};function x(e){return{value:e,map(t){let r=e.then(o=>{if(B(o))try{let a=t(o.value);return p(a)}catch(a){return s(a)}else return s(o.value)});return x(r)},flatMap(t){let r=e.then(o=>{if(B(o))try{return t(o.value).value}catch(a){return Promise.resolve(s(a))}else return Promise.resolve(s(o.value))});return x(r)},mapLeft(t){let r=e.then(o=>{if(K(o))try{let a=t(o.value);return s(a)}catch(a){return s(a)}else return p(o.value)});return x(r)},fold(t,r){return e.then(o=>B(o)?r(o.value):t(o.value))}}}var m=e=>{let t={values:new E(e)},r=()=>Array.from(t.values.entries()).map(([i,l])=>_([i,l])),o=i=>m(new E(t.values).set(i.toArray()[0],i.toArray()[1]).entries()),a=i=>{let l=new E(t.values);return l.delete(i)?m(l.entries()):m(t.values.entries())},n=i=>t.values.get(i[0])===i[1],f=()=>t.values.size,M=i=>m(Array.from(t.values.entries()).map(([l,$])=>[l,i($)])),w=i=>{let l=m(t.values.entries()).toList();return m(l.flatMap(i).toArray())},P=i=>u(r()).reduce(i),q=i=>u(r()).reduceRight(i),z=i=>l=>u(r()).foldLeft(i)(l),N=i=>l=>u(r()).foldRight(i)(l),F=i=>A(t.values.get(i)),k=(i,l)=>A(t.values.get(i)).getOrElse(l),C=()=>t.values.size===0;return{add:o,remove:a,contains:n,get size(){return f()},map:M,flatMap:w,reduce:P,reduceRight:q,foldLeft:z,foldRight:N,get:F,getOrElse:k,get isEmpty(){return C()},orElse:(i,l)=>A(t.values.get(i)).orElse(l),toList:()=>T(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},Ne=e=>m(e);import Q from"safe-stable-stringify";var I=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>I(e),orThrow:t=>e,toEither:()=>p(e),map:t=>W(()=>t(e)),flatMap:t=>t(e),valueOf:()=>({_tag:"Success",value:e}),toString:()=>`Success(${Q(e)})`}),S=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:()=>s(e),map:t=>S(e),flatMap:t=>S(e),valueOf:()=>({_tag:"Failure",error:e}),toString:()=>`Failure(${e.message})`}),W=e=>{try{return I(e())}catch(t){return S(t instanceof Error?t:new Error(String(t)))}};import X from"safe-stable-stringify";var L=e=>({_tag:"Some",value:e,isEmpty:!1,get:()=>e,getOrElse:()=>e,orElse:()=>L(e),map:t=>L(t(e)),filter(t){return t(e)?L(e):h},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:()=>T([e]),contains:t=>t===e,size:1,toEither:t=>p(e),toString:()=>`Some(${X(e)})`,valueOf:()=>({_tag:"Some",value:e})}),h={_tag:"None",value:void 0,isEmpty:!0,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,orElse:e=>e,map:e=>h,filter(e){return h},flatMap:e=>h,reduce:()=>{},reduceRight:()=>{},foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>T([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",valueOf:()=>({_tag:"None"})},y=()=>h,A=e=>e!=null?L(e):y();export{L as a,y as b,A as c,d,u as e,R as f,T as g,G as h,p as i,s as j,B as k,K as l,Be as m,H as n,J as o,xe as p,x as q,Ne as r,W as s};