functype 0.8.17 → 0.8.19

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 (54) hide show
  1. package/dist/{chunk-PPM423LB.mjs → chunk-BTEQN6BB.mjs} +1 -1
  2. package/dist/{chunk-536WWFUT.js → chunk-RGJRKBXI.js} +1 -1
  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-BWFWSCT7.d.mts → index-CZsKzO-N.d.mts} +7 -5
  14. package/dist/{index-DMF8XnhA.d.ts → index-i5kzqn22.d.ts} +7 -5
  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 +1 -1
  20. package/dist/iterable/Seq.d.ts +1 -1
  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/util/index.d.mts +1 -1
  48. package/dist/util/index.d.ts +1 -1
  49. package/dist/util/index.js +1 -1
  50. package/dist/util/index.mjs +1 -1
  51. package/lib/either/Either.d.ts +5 -2
  52. package/lib/list/List.d.ts +2 -2
  53. package/lib/option/Option.d.ts +1 -1
  54. package/package.json +1 -1
@@ -1 +1 @@
1
- import{a as x}from"./chunk-2I2NKDFN.mjs";import{a as U}from"./chunk-RRAIFS3D.mjs";import{a as E}from"./chunk-377WQNCB.mjs";import{a as b}from"./chunk-HA5XD5KC.mjs";var y=e=>{let t=U(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=>y(r.map(o)),flatMap:o=>y(r.flatMap(a=>o(a).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(a=>!o(a))),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=>a=>r.reduce(a,o),foldRight:o=>a=>r.reduceRight((n,u)=>a(u,n),o),valueOf:()=>({values:r})}},p=e=>y(e);var g=e=>{let t=U(e)?new b(e):new b(e?.toArray()??[]),r=p(t),o={...r,add:a=>g([...t,a]),remove:a=>{let n=new b(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:()=>c(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},B=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):[],o=p(r),a={...o,_tag:"List",length:r.length,map:n=>m(r.map(n)),flatMap:n=>m(o.flatMap(n)),remove:n=>{let u=r.indexOf(n);return a.removeAt(u)},contains:n=>r.includes(n),add:n=>m([...r,n]),removeAt:n=>n<0||n>=r.length?a:m([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>m([...r,...n.toArray()]),toList:()=>a,toSet:()=>B(r),toString:()=>`List(${r.toString()})`,valueOf:()=>({_tag:"List",values:r})};return new Proxy(a,{get(n,u){return typeof u=="symbol"||isNaN(Number(u))?n[u]:n.get(Number(u))}})},c=e=>m(e);var k=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:()=>c([e]),valueOf:()=>({_tag:"Right",value:e}),toString:()=>`Right(${JSON.stringify(e)})`}),C=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:()=>c(),valueOf:()=>({_tag:"Left",value:e}),toString:()=>`Left(${JSON.stringify(e)})`}),f=e=>k(e),s=e=>C(e),R=e=>e.isRight(),_=e=>e.isLeft(),Te=(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},me=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(o=>{if(R(o))try{let a=t(o.value);return f(a)}catch(a){return s(a)}else return s(o.value)});return S(r)},flatMap(t){let r=e.then(o=>{if(R(o))try{return t(o.value).value}catch(a){return Promise.resolve(s(a))}else return Promise.resolve(s(o.value))});return S(r)},mapLeft(t){let r=e.then(o=>{if(_(o))try{let a=t(o.value);return s(a)}catch(a){return s(a)}else return f(o.value)});return S(r)},fold(t,r){return e.then(o=>R(o)?r(o.value):t(o.value))}}}var T=e=>{let t={values:new E(e)},r=()=>Array.from(t.values.entries()).map(([i,l])=>x([i,l])),o=i=>T(new E(t.values).set(i.toArray()[0],i.toArray()[1]).entries()),a=i=>{let l=new E(t.values);return l.delete(i)?T(l.entries()):T(t.values.entries())},n=i=>t.values.get(i[0])===i[1],u=()=>t.values.size,V=i=>T(Array.from(t.values.entries()).map(([l,q])=>[l,i(q)])),K=i=>{let l=T(t.values.entries()).toList();return T(l.flatMap(i).toArray())},I=i=>p(r()).reduce(i),M=i=>p(r()).reduceRight(i),w=i=>l=>p(r()).foldLeft(i)(l),P=i=>l=>p(r()).foldRight(i)(l),N=i=>A(t.values.get(i)),z=(i,l)=>A(t.values.get(i)).getOrElse(l),F=()=>t.values.size===0;return{add:o,remove:a,contains:n,get size(){return u()},map:V,flatMap:K,reduce:I,reduceRight:M,foldLeft:w,foldRight:P,get:N,getOrElse:z,get isEmpty(){return F()},orElse:(i,l)=>A(t.values.get(i)).orElse(l),toList:()=>c(r()),toSet:()=>B(r()),toString:()=>`Map(${r().toString()})`}},xe=e=>T(e);var O=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>O(e),orThrow:t=>e,toEither:()=>f(e),map:t=>$(()=>t(e)),flatMap:t=>t(e),valueOf:()=>({_tag:"Success",value:e}),toString:()=>`Success(${JSON.stringify(e)})`}),v=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=>v(e),flatMap:t=>v(e),valueOf:()=>({_tag:"Failure",error:e}),toString:()=>`Failure(${e.message})`}),$=e=>{try{return O(e())}catch(t){return v(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(${JSON.stringify(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:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",valueOf:()=>({_tag:"None"})},L=()=>h,A=e=>e!=null?d(e):L();export{d as a,L as b,A as c,y as d,p as e,B as f,c as g,f as h,s as i,R as j,_ as k,Te as l,me as m,S as n,xe as o,$ as p};
1
+ import{a as b}from"./chunk-HA5XD5KC.mjs";import{a as U}from"./chunk-RRAIFS3D.mjs";import{a as E}from"./chunk-377WQNCB.mjs";import{a as x}from"./chunk-2I2NKDFN.mjs";var y=e=>{let t=U(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=>y(r.map(o)),flatMap:o=>y(r.flatMap(a=>o(a).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(a=>!o(a))),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=>a=>r.reduce(a,o),foldRight:o=>a=>r.reduceRight((n,u)=>a(u,n),o),valueOf:()=>({values:r})}},p=e=>y(e);var g=e=>{let t=U(e)?new b(e):new b(e?.toArray()??[]),r=p(t),o={...r,add:a=>g([...t,a]),remove:a=>{let n=new b(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:()=>c(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},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):[],o=p(r),a={...o,_tag:"List",length:r.length,map:n=>m(r.map(n)),flatMap:n=>m(o.flatMap(n)),remove:n=>{let u=r.indexOf(n);return a.removeAt(u)},contains:n=>r.includes(n),add:n=>m([...r,n]),removeAt:n=>n<0||n>=r.length?a:m([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>m([...r,...n.toArray()]),toList:()=>a,toSet:()=>R(r),toString:()=>`List(${r.toString()})`,valueOf:()=>({_tag:"List",values:r})};return new Proxy(a,{get(n,u){return typeof u=="symbol"||isNaN(Number(u))?n[u]:n.get(Number(u))}})},c=e=>m(e);var k=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:()=>c([e]),valueOf:()=>({_tag:"Right",value:e}),toString:()=>`Right(${JSON.stringify(e)})`}),C=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:()=>c(),valueOf:()=>({_tag:"Left",value:e}),toString:()=>`Left(${JSON.stringify(e)})`}),f=e=>k(e),s=e=>C(e),B=e=>e.isRight(),_=e=>e.isLeft(),Te=(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},me=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(o=>{if(B(o))try{let a=t(o.value);return f(a)}catch(a){return s(a)}else return s(o.value)});return S(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 S(r)},mapLeft(t){let r=e.then(o=>{if(_(o))try{let a=t(o.value);return s(a)}catch(a){return s(a)}else return f(o.value)});return S(r)},fold(t,r){return e.then(o=>B(o)?r(o.value):t(o.value))}}}var T=e=>{let t={values:new E(e)},r=()=>Array.from(t.values.entries()).map(([i,l])=>x([i,l])),o=i=>T(new E(t.values).set(i.toArray()[0],i.toArray()[1]).entries()),a=i=>{let l=new E(t.values);return l.delete(i)?T(l.entries()):T(t.values.entries())},n=i=>t.values.get(i[0])===i[1],u=()=>t.values.size,V=i=>T(Array.from(t.values.entries()).map(([l,q])=>[l,i(q)])),K=i=>{let l=T(t.values.entries()).toList();return T(l.flatMap(i).toArray())},I=i=>p(r()).reduce(i),M=i=>p(r()).reduceRight(i),w=i=>l=>p(r()).foldLeft(i)(l),P=i=>l=>p(r()).foldRight(i)(l),N=i=>A(t.values.get(i)),z=(i,l)=>A(t.values.get(i)).getOrElse(l),F=()=>t.values.size===0;return{add:o,remove:a,contains:n,get size(){return u()},map:V,flatMap:K,reduce:I,reduceRight:M,foldLeft:w,foldRight:P,get:N,getOrElse:z,get isEmpty(){return F()},orElse:(i,l)=>A(t.values.get(i)).orElse(l),toList:()=>c(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},xe=e=>T(e);var O=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>O(e),orThrow:t=>e,toEither:()=>f(e),map:t=>$(()=>t(e)),flatMap:t=>t(e),valueOf:()=>({_tag:"Success",value:e}),toString:()=>`Success(${JSON.stringify(e)})`}),v=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=>v(e),flatMap:t=>v(e),valueOf:()=>({_tag:"Failure",error:e}),toString:()=>`Failure(${e.message})`}),$=e=>{try{return O(e())}catch(t){return v(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(${JSON.stringify(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:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",valueOf:()=>({_tag:"None"})},L=()=>h,A=e=>e!=null?d(e):L();export{d as a,L as b,A as c,y as d,p as e,R as f,c as g,f as h,s as i,B as j,_ as k,Te as l,me as m,S as n,xe as o,$ as p};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var _chunkBNNK42JCjs = require('./chunk-BNNK42JC.js');var _chunk5VTXJIR3js = require('./chunk-5VTXJIR3.js');var _chunk3VJERXBPjs = require('./chunk-3VJERXBP.js');var y=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=>y(r.map(o)),flatMap:o=>y(r.flatMap(a=>o(a).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(a=>!o(a))),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=>a=>r.reduce(a,o),foldRight:o=>a=>r.reduceRight((n,u)=>a(u,n),o),valueOf:()=>({values:r})}},p= 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=p(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:()=>c(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},B= 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):[],o=p(r),a={...o,_tag:"List",length:r.length,map:n=>m(r.map(n)),flatMap:n=>m(o.flatMap(n)),remove:n=>{let u=r.indexOf(n);return a.removeAt(u)},contains:n=>r.includes(n),add:n=>m([...r,n]),removeAt:n=>n<0||n>=r.length?a:m([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>m([...r,...n.toArray()]),toList:()=>a,toSet:()=>B(r),toString:()=>`List(${r.toString()})`,valueOf:()=>({_tag:"List",values:r})};return new Proxy(a,{get(n,u){return typeof u=="symbol"||isNaN(Number(u))?n[u]:n.get(Number(u))}})},c= exports.g =e=>m(e);var k=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:()=>c([e]),valueOf:()=>({_tag:"Right",value:e}),toString:()=>`Right(${JSON.stringify(e)})`}),C=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:()=>c(),valueOf:()=>({_tag:"Left",value:e}),toString:()=>`Left(${JSON.stringify(e)})`}),f= exports.h =e=>k(e),s= exports.i =e=>C(e),R= exports.j =e=>e.isRight(),_= exports.k =e=>e.isLeft(),Te= exports.l =(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},me= exports.m =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(o=>{if(R(o))try{let a=t(o.value);return f(a)}catch(a){return s(a)}else return s(o.value)});return S(r)},flatMap(t){let r=e.then(o=>{if(R(o))try{return t(o.value).value}catch(a){return Promise.resolve(s(a))}else return Promise.resolve(s(o.value))});return S(r)},mapLeft(t){let r=e.then(o=>{if(_(o))try{let a=t(o.value);return s(a)}catch(a){return s(a)}else return f(o.value)});return S(r)},fold(t,r){return e.then(o=>R(o)?r(o.value):t(o.value))}}}var T=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=>T(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)?T(l.entries()):T(t.values.entries())},n=i=>t.values.get(i[0])===i[1],u=()=>t.values.size,V=i=>T(Array.from(t.values.entries()).map(([l,q])=>[l,i(q)])),K=i=>{let l=T(t.values.entries()).toList();return T(l.flatMap(i).toArray())},I=i=>p(r()).reduce(i),M=i=>p(r()).reduceRight(i),w=i=>l=>p(r()).foldLeft(i)(l),P=i=>l=>p(r()).foldRight(i)(l),N=i=>A(t.values.get(i)),z=(i,l)=>A(t.values.get(i)).getOrElse(l),F=()=>t.values.size===0;return{add:o,remove:a,contains:n,get size(){return u()},map:V,flatMap:K,reduce:I,reduceRight:M,foldLeft:w,foldRight:P,get:N,getOrElse:z,get isEmpty(){return F()},orElse:(i,l)=>A(t.values.get(i)).orElse(l),toList:()=>c(r()),toSet:()=>B(r()),toString:()=>`Map(${r().toString()})`}},xe= exports.o =e=>T(e);var O=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>O(e),orThrow:t=>e,toEither:()=>f(e),map:t=>$(()=>t(e)),flatMap:t=>t(e),valueOf:()=>({_tag:"Success",value:e}),toString:()=>`Success(${JSON.stringify(e)})`}),v=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=>v(e),flatMap:t=>v(e),valueOf:()=>({_tag:"Failure",error:e}),toString:()=>`Failure(${e.message})`}),$= exports.p =e=>{try{return O(e())}catch(t){return v(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(${JSON.stringify(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:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",valueOf:()=>({_tag:"None"})},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 = p; exports.f = B; exports.g = c; exports.h = f; exports.i = s; exports.j = R; exports.k = _; exports.l = Te; exports.m = me; exports.n = S; exports.o = xe; exports.p = $;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkBNNK42JCjs = require('./chunk-BNNK42JC.js');var _chunk5VTXJIR3js = require('./chunk-5VTXJIR3.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var y=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=>y(r.map(o)),flatMap:o=>y(r.flatMap(a=>o(a).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(a=>!o(a))),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=>a=>r.reduce(a,o),foldRight:o=>a=>r.reduceRight((n,u)=>a(u,n),o),valueOf:()=>({values:r})}},p= 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=p(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:()=>c(t),toSet:()=>o,toString:()=>`Set(${Array.from(t).toString()})`};return o},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):[],o=p(r),a={...o,_tag:"List",length:r.length,map:n=>m(r.map(n)),flatMap:n=>m(o.flatMap(n)),remove:n=>{let u=r.indexOf(n);return a.removeAt(u)},contains:n=>r.includes(n),add:n=>m([...r,n]),removeAt:n=>n<0||n>=r.length?a:m([...r.slice(0,n),...r.slice(n+1)]),get:n=>A(r[n]),concat:n=>m([...r,...n.toArray()]),toList:()=>a,toSet:()=>R(r),toString:()=>`List(${r.toString()})`,valueOf:()=>({_tag:"List",values:r})};return new Proxy(a,{get(n,u){return typeof u=="symbol"||isNaN(Number(u))?n[u]:n.get(Number(u))}})},c= exports.g =e=>m(e);var k=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:()=>c([e]),valueOf:()=>({_tag:"Right",value:e}),toString:()=>`Right(${JSON.stringify(e)})`}),C=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:()=>c(),valueOf:()=>({_tag:"Left",value:e}),toString:()=>`Left(${JSON.stringify(e)})`}),f= exports.h =e=>k(e),s= exports.i =e=>C(e),B= exports.j =e=>e.isRight(),_= exports.k =e=>e.isLeft(),Te= exports.l =(e,t)=>{try{return f(e())}catch(r){return s(t(r))}},me= exports.m =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(o=>{if(B(o))try{let a=t(o.value);return f(a)}catch(a){return s(a)}else return s(o.value)});return S(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 S(r)},mapLeft(t){let r=e.then(o=>{if(_(o))try{let a=t(o.value);return s(a)}catch(a){return s(a)}else return f(o.value)});return S(r)},fold(t,r){return e.then(o=>B(o)?r(o.value):t(o.value))}}}var T=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=>T(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)?T(l.entries()):T(t.values.entries())},n=i=>t.values.get(i[0])===i[1],u=()=>t.values.size,V=i=>T(Array.from(t.values.entries()).map(([l,q])=>[l,i(q)])),K=i=>{let l=T(t.values.entries()).toList();return T(l.flatMap(i).toArray())},I=i=>p(r()).reduce(i),M=i=>p(r()).reduceRight(i),w=i=>l=>p(r()).foldLeft(i)(l),P=i=>l=>p(r()).foldRight(i)(l),N=i=>A(t.values.get(i)),z=(i,l)=>A(t.values.get(i)).getOrElse(l),F=()=>t.values.size===0;return{add:o,remove:a,contains:n,get size(){return u()},map:V,flatMap:K,reduce:I,reduceRight:M,foldLeft:w,foldRight:P,get:N,getOrElse:z,get isEmpty(){return F()},orElse:(i,l)=>A(t.values.get(i)).orElse(l),toList:()=>c(r()),toSet:()=>R(r()),toString:()=>`Map(${r().toString()})`}},xe= exports.o =e=>T(e);var O=e=>({_tag:"Success",value:e,error:void 0,isSuccess:()=>!0,isFailure:()=>!1,get:()=>e,getOrElse:t=>e,orElse:t=>O(e),orThrow:t=>e,toEither:()=>f(e),map:t=>$(()=>t(e)),flatMap:t=>t(e),valueOf:()=>({_tag:"Success",value:e}),toString:()=>`Success(${JSON.stringify(e)})`}),v=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=>v(e),flatMap:t=>v(e),valueOf:()=>({_tag:"Failure",error:e}),toString:()=>`Failure(${e.message})`}),$= exports.p =e=>{try{return O(e())}catch(t){return v(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(${JSON.stringify(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:()=>p([]),contains:()=>!1,size:0,toEither:e=>s(e),toString:()=>"None",valueOf:()=>({_tag:"None"})},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 = p; exports.f = R; exports.g = c; exports.h = f; exports.i = s; exports.j = B; exports.k = _; exports.l = Te; exports.m = me; exports.n = S; exports.o = xe; exports.p = $;
@@ -1,4 +1,4 @@
1
- export { d as Collection, C as Converters } from '../index-BWFWSCT7.mjs';
1
+ export { d as Collection, C as Converters } from '../index-CZsKzO-N.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-DMF8XnhA.js';
1
+ export { d as Collection, C as Converters } from '../index-i5kzqn22.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, e as Left, R as Right, f as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from '../index-BWFWSCT7.mjs';
2
+ export { E as Either, e as Left, R as Right, f as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from '../index-CZsKzO-N.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, e as Left, R as Right, f as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from '../index-DMF8XnhA.js';
2
+ export { E as Either, e as Left, R as Right, f as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Left = _chunk536WWFUTjs.i; exports.Right = _chunk536WWFUTjs.h; exports.isLeft = _chunk536WWFUTjs.k; exports.isRight = _chunk536WWFUTjs.j; exports.tryCatch = _chunk536WWFUTjs.l; exports.tryCatchAsync = _chunk536WWFUTjs.m;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');exports.Left = _chunkRGJRKBXIjs.i; exports.Right = _chunkRGJRKBXIjs.h; exports.isLeft = _chunkRGJRKBXIjs.k; exports.isRight = _chunkRGJRKBXIjs.j; exports.tryCatch = _chunkRGJRKBXIjs.l; exports.tryCatchAsync = _chunkRGJRKBXIjs.m;
@@ -1 +1 @@
1
- import{h as a,i as b,j as c,k as d,l as e,m as f}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{b as Left,a as Right,d as isLeft,c as isRight,e as tryCatch,f as tryCatchAsync};
1
+ import{h as a,i as b,j as c,k as d,l as e,m as f}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.mjs";export{b as Left,a as Right,d as isLeft,c as isRight,e as tryCatch,f as tryCatchAsync};
@@ -1,4 +1,4 @@
1
- export { h as EitherT } from '../index-BWFWSCT7.mjs';
1
+ export { h as EitherT } from '../index-CZsKzO-N.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 { h as EitherT } from '../index-DMF8XnhA.js';
1
+ export { h as EitherT } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.EitherT = _chunk536WWFUTjs.n;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');exports.EitherT = _chunkRGJRKBXIjs.n;
@@ -1 +1 @@
1
- import{n as a}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as EitherT};
1
+ import{n as a}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.mjs";export{a as EitherT};
@@ -28,7 +28,7 @@ type Option<T extends Type> = {
28
28
  };
29
29
  toEither<E>(left: E): Either<E, T>;
30
30
  toString(): string;
31
- } & Traversable<T> & Functor<T> & Typeable<"Some" | "None">;
31
+ } & (Traversable<T> & Functor<T> & Typeable<"Some" | "None">);
32
32
  declare const Option: <T extends Type>(value: T | null | undefined) => Option<T>;
33
33
 
34
34
  declare const createSeq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
@@ -98,7 +98,7 @@ type Converters<A> = {
98
98
  };
99
99
  type Collection<A> = Converters<A>;
100
100
 
101
- type List<A> = {
101
+ type List<A> = ({
102
102
  add: (item: A) => List<A>;
103
103
  map: <B>(f: (a: A) => B) => List<B>;
104
104
  flatMap: <B>(f: (a: A) => _Iterable_<B>) => List<B>;
@@ -114,10 +114,10 @@ type List<A> = {
114
114
  _tag: string;
115
115
  values: A[];
116
116
  };
117
- } & ArrayLike<A> & _Iterable_<A> & Collection<A> & Typeable<"List">;
117
+ } & ArrayLike<A>) & (_Iterable_<A> & Collection<A> & Typeable<"List">);
118
118
  declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
119
119
 
120
- type Either<L extends Type, R extends Type> = {
120
+ type Either<L extends Left, R extends Right> = {
121
121
  readonly _tag: "Left" | "Right";
122
122
  value: L | R;
123
123
  isLeft: () => boolean;
@@ -135,8 +135,10 @@ type Either<L extends Type, R extends Type> = {
135
135
  value: L | R;
136
136
  };
137
137
  toString: () => string;
138
- } & Functor<R> & Typeable<"Left" | "Right">;
138
+ } & (Functor<R> & Typeable<"Left" | "Right">);
139
+ type Right = Type;
139
140
  declare const Right: <L extends Type, R extends Type>(value: R) => Either<L, R>;
141
+ type Left = Type;
140
142
  declare const Left: <L extends Type, R extends Type>(value: L) => Either<L, R>;
141
143
  declare const isRight: <L extends Type, R extends Type>(either: Either<L, R>) => either is Either<L, R> & {
142
144
  value: R;
@@ -28,7 +28,7 @@ type Option<T extends Type> = {
28
28
  };
29
29
  toEither<E>(left: E): Either<E, T>;
30
30
  toString(): string;
31
- } & Traversable<T> & Functor<T> & Typeable<"Some" | "None">;
31
+ } & (Traversable<T> & Functor<T> & Typeable<"Some" | "None">);
32
32
  declare const Option: <T extends Type>(value: T | null | undefined) => Option<T>;
33
33
 
34
34
  declare const createSeq: <A>(values?: Iterable<A> | _Iterable_<A>) => Seq<A>;
@@ -98,7 +98,7 @@ type Converters<A> = {
98
98
  };
99
99
  type Collection<A> = Converters<A>;
100
100
 
101
- type List<A> = {
101
+ type List<A> = ({
102
102
  add: (item: A) => List<A>;
103
103
  map: <B>(f: (a: A) => B) => List<B>;
104
104
  flatMap: <B>(f: (a: A) => _Iterable_<B>) => List<B>;
@@ -114,10 +114,10 @@ type List<A> = {
114
114
  _tag: string;
115
115
  values: A[];
116
116
  };
117
- } & ArrayLike<A> & _Iterable_<A> & Collection<A> & Typeable<"List">;
117
+ } & ArrayLike<A>) & (_Iterable_<A> & Collection<A> & Typeable<"List">);
118
118
  declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
119
119
 
120
- type Either<L extends Type, R extends Type> = {
120
+ type Either<L extends Left, R extends Right> = {
121
121
  readonly _tag: "Left" | "Right";
122
122
  value: L | R;
123
123
  isLeft: () => boolean;
@@ -135,8 +135,10 @@ type Either<L extends Type, R extends Type> = {
135
135
  value: L | R;
136
136
  };
137
137
  toString: () => string;
138
- } & Functor<R> & Typeable<"Left" | "Right">;
138
+ } & (Functor<R> & Typeable<"Left" | "Right">);
139
+ type Right = Type;
139
140
  declare const Right: <L extends Type, R extends Type>(value: R) => Either<L, R>;
141
+ type Left = Type;
140
142
  declare const Left: <L extends Type, R extends Type>(value: L) => Either<L, R>;
141
143
  declare const isRight: <L extends Type, R extends Type>(either: Either<L, R>) => either is Either<L, R> & {
142
144
  value: R;
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, h as EitherT, e 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, j as Traversable, T as Try, _ as _Iterable_, f as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from './index-BWFWSCT7.mjs';
2
+ export { E as Either, h as EitherT, e 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, j as Traversable, T as Try, _ as _Iterable_, f as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from './index-CZsKzO-N.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, h as EitherT, e 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, j as Traversable, T as Try, _ as _Iterable_, f as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from './index-DMF8XnhA.js';
2
+ export { E as Either, h as EitherT, e 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, j as Traversable, T as Try, _ as _Iterable_, f as isLeft, i as isRight, t as tryCatch, g as tryCatchAsync } from './index-i5kzqn22.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 _chunk536WWFUTjs = require('./chunk-536WWFUT.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');var _chunk5O6YELD3js = require('./chunk-5O6YELD3.js');require('./chunk-BNNK42JC.js');require('./chunk-5VTXJIR3.js');require('./chunk-3VJERXBP.js');require('./chunk-XORABVON.js');require('./chunk-K3EKBPQE.js');exports.EitherT = _chunk536WWFUTjs.n; exports.Left = _chunk536WWFUTjs.i; exports.List = _chunk536WWFUTjs.g; exports.Map = _chunk536WWFUTjs.o; exports.None = _chunk536WWFUTjs.b; exports.Option = _chunk536WWFUTjs.c; exports.Right = _chunk536WWFUTjs.h; exports.Seq = _chunk536WWFUTjs.e; exports.Set = _chunk536WWFUTjs.f; exports.Some = _chunk536WWFUTjs.a; exports.Try = _chunk536WWFUTjs.p; exports.Tuple = _chunkOXLZ6UIZjs.a; exports.Typeable = _chunk5O6YELD3js.a; exports.isLeft = _chunk536WWFUTjs.k; exports.isRight = _chunk536WWFUTjs.j; exports.tryCatch = _chunk536WWFUTjs.l; exports.tryCatchAsync = _chunk536WWFUTjs.m;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('./chunk-RGJRKBXI.js');require('./chunk-3VJERXBP.js');var _chunk5O6YELD3js = require('./chunk-5O6YELD3.js');require('./chunk-BNNK42JC.js');require('./chunk-K3EKBPQE.js');require('./chunk-5VTXJIR3.js');var _chunkOXLZ6UIZjs = require('./chunk-OXLZ6UIZ.js');require('./chunk-XORABVON.js');exports.EitherT = _chunkRGJRKBXIjs.n; exports.Left = _chunkRGJRKBXIjs.i; exports.List = _chunkRGJRKBXIjs.g; exports.Map = _chunkRGJRKBXIjs.o; exports.None = _chunkRGJRKBXIjs.b; exports.Option = _chunkRGJRKBXIjs.c; exports.Right = _chunkRGJRKBXIjs.h; exports.Seq = _chunkRGJRKBXIjs.e; exports.Set = _chunkRGJRKBXIjs.f; exports.Some = _chunkRGJRKBXIjs.a; exports.Try = _chunkRGJRKBXIjs.p; exports.Tuple = _chunkOXLZ6UIZjs.a; exports.Typeable = _chunk5O6YELD3js.a; exports.isLeft = _chunkRGJRKBXIjs.k; exports.isRight = _chunkRGJRKBXIjs.j; exports.tryCatch = _chunkRGJRKBXIjs.l; exports.tryCatchAsync = _chunkRGJRKBXIjs.m;
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,p}from"./chunk-PPM423LB.mjs";import{a as n}from"./chunk-2I2NKDFN.mjs";import{a as q}from"./chunk-V7DKESTM.mjs";import"./chunk-RRAIFS3D.mjs";import"./chunk-377WQNCB.mjs";import"./chunk-HA5XD5KC.mjs";import"./chunk-V2J3R5IU.mjs";import"./chunk-2ML63TYF.mjs";export{m as EitherT,h as Left,f as List,o as Map,b as None,c as Option,g as Right,d as Seq,e as Set,a as Some,p as Try,n as Tuple,q as Typeable,j as isLeft,i as isRight,k as tryCatch,l 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,p}from"./chunk-BTEQN6BB.mjs";import"./chunk-HA5XD5KC.mjs";import{a as q}from"./chunk-V7DKESTM.mjs";import"./chunk-RRAIFS3D.mjs";import"./chunk-2ML63TYF.mjs";import"./chunk-377WQNCB.mjs";import{a as n}from"./chunk-2I2NKDFN.mjs";import"./chunk-V2J3R5IU.mjs";export{m as EitherT,h as Left,f as List,o as Map,b as None,c as Option,g as Right,d as Seq,e as Set,a as Some,p as Try,n as Tuple,q as Typeable,j as isLeft,i as isRight,k as tryCatch,l as tryCatchAsync};
@@ -1,4 +1,4 @@
1
- export { a as Seq, c as createSeq } from '../index-BWFWSCT7.mjs';
1
+ export { a as Seq, c as createSeq } from '../index-CZsKzO-N.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 { a as Seq, c as createSeq } from '../index-DMF8XnhA.js';
1
+ export { a as Seq, c as createSeq } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Seq = _chunk536WWFUTjs.e; exports.createSeq = _chunk536WWFUTjs.d;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');exports.Seq = _chunkRGJRKBXIjs.e; exports.createSeq = _chunkRGJRKBXIjs.d;
@@ -1 +1 @@
1
- import{d as a,e as b}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{b as Seq,a as createSeq};
1
+ import{d as a,e as b}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.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-BWFWSCT7.mjs';
2
+ export { a as Seq, _ as _Iterable_ } from '../index-CZsKzO-N.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-DMF8XnhA.js';
2
+ export { a as Seq, _ as _Iterable_ } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Seq = _chunk536WWFUTjs.e;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');exports.Seq = _chunkRGJRKBXIjs.e;
@@ -1 +1 @@
1
- import{e as a}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Seq};
1
+ import{e as a}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.mjs";export{a as Seq};
@@ -1,4 +1,4 @@
1
- export { L as List } from '../index-BWFWSCT7.mjs';
1
+ export { L as List } from '../index-CZsKzO-N.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 } from '../index-DMF8XnhA.js';
1
+ export { L as List } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.List = _chunk536WWFUTjs.g;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');exports.List = _chunkRGJRKBXIjs.g;
@@ -1 +1 @@
1
- import{g as a}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as List};
1
+ import{g as a}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.mjs";export{a as List};
@@ -1,4 +1,4 @@
1
- export { M as Map } from '../index-BWFWSCT7.mjs';
1
+ export { M as Map } from '../index-CZsKzO-N.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-DMF8XnhA.js';
1
+ export { M as Map } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Map = _chunk536WWFUTjs.o;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');exports.Map = _chunkRGJRKBXIjs.o;
package/dist/map/Map.mjs CHANGED
@@ -1 +1 @@
1
- import{o as a}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Map};
1
+ import{o as a}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.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-BWFWSCT7.mjs';
2
+ export { N as None, O as Option, S as Some } from '../index-CZsKzO-N.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-DMF8XnhA.js';
2
+ export { N as None, O as Option, S as Some } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.None = _chunk536WWFUTjs.b; exports.Option = _chunk536WWFUTjs.c; exports.Some = _chunk536WWFUTjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');exports.None = _chunkRGJRKBXIjs.b; exports.Option = _chunkRGJRKBXIjs.c; exports.Some = _chunkRGJRKBXIjs.a;
@@ -1 +1 @@
1
- import{a,b,c}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{b as None,c as Option,a as Some};
1
+ import{a,b,c}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.mjs";export{b as None,c as Option,a as Some};
@@ -1,4 +1,4 @@
1
- export { b as Set } from '../index-BWFWSCT7.mjs';
1
+ export { b as Set } from '../index-CZsKzO-N.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-DMF8XnhA.js';
1
+ export { b as Set } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Set = _chunk536WWFUTjs.f;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');exports.Set = _chunkRGJRKBXIjs.f;
package/dist/set/Set.mjs CHANGED
@@ -1 +1 @@
1
- import{f as a}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Set};
1
+ import{f as a}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.mjs";export{a as Set};
@@ -1,4 +1,4 @@
1
- export { T as Try } from '../index-BWFWSCT7.mjs';
1
+ export { T as Try } from '../index-CZsKzO-N.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 { T as Try } from '../index-DMF8XnhA.js';
1
+ export { T as Try } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');exports.Try = _chunk536WWFUTjs.p;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');exports.Try = _chunkRGJRKBXIjs.p;
package/dist/try/Try.mjs CHANGED
@@ -1 +1 @@
1
- import{p as a}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V2J3R5IU.mjs";import"../chunk-2ML63TYF.mjs";export{a as Try};
1
+ import{p as a}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V2J3R5IU.mjs";export{a as Try};
@@ -1,4 +1,4 @@
1
- import { E as Either } from '../index-BWFWSCT7.mjs';
1
+ import { E as Either } from '../index-CZsKzO-N.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-DMF8XnhA.js';
1
+ import { E as Either } from '../index-i5kzqn22.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 _chunk536WWFUTjs = require('../chunk-536WWFUT.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-5VTXJIR3.js');require('../chunk-3VJERXBP.js');require('../chunk-XORABVON.js');require('../chunk-K3EKBPQE.js');var a=o=>{let r=parseInt(o,10);return isNaN(r)?_chunk536WWFUTjs.i.call(void 0, _chunkE6RS47F7js.a.call(void 0, `${r}`)):_chunk536WWFUTjs.h.call(void 0, r)};exports.parseNumber = a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkE6RS47F7js = require('../chunk-E6RS47F7.js');var _chunkRGJRKBXIjs = require('../chunk-RGJRKBXI.js');require('../chunk-3VJERXBP.js');require('../chunk-5O6YELD3.js');require('../chunk-BNNK42JC.js');require('../chunk-K3EKBPQE.js');require('../chunk-5VTXJIR3.js');require('../chunk-OXLZ6UIZ.js');require('../chunk-XORABVON.js');var a=o=>{let r=parseInt(o,10);return isNaN(r)?_chunkRGJRKBXIjs.i.call(void 0, _chunkE6RS47F7js.a.call(void 0, `${r}`)):_chunkRGJRKBXIjs.h.call(void 0, r)};exports.parseNumber = a;
@@ -1 +1 @@
1
- import{a as s}from"../chunk-VK5GL6NM.mjs";import{h as e,i as t}from"../chunk-PPM423LB.mjs";import"../chunk-2I2NKDFN.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-HA5XD5KC.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};
1
+ import{a as s}from"../chunk-VK5GL6NM.mjs";import{h as e,i as t}from"../chunk-BTEQN6BB.mjs";import"../chunk-HA5XD5KC.mjs";import"../chunk-V7DKESTM.mjs";import"../chunk-RRAIFS3D.mjs";import"../chunk-2ML63TYF.mjs";import"../chunk-377WQNCB.mjs";import"../chunk-2I2NKDFN.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};
@@ -2,7 +2,9 @@ import { Functor, Type } from "../functor";
2
2
  import { List } from "../list/List";
3
3
  import { Option } from "../option/Option";
4
4
  import { Typeable } from "../typeable/Typeable";
5
- export type Either<L extends Type, R extends Type> = {
5
+ type Right = Type;
6
+ type Left = Type;
7
+ export type Either<L extends Left, R extends Right> = {
6
8
  readonly _tag: "Left" | "Right";
7
9
  value: L | R;
8
10
  isLeft: () => boolean;
@@ -20,7 +22,7 @@ export type Either<L extends Type, R extends Type> = {
20
22
  value: L | R;
21
23
  };
22
24
  toString: () => string;
23
- } & Functor<R> & Typeable<"Left" | "Right">;
25
+ } & (Functor<R> & Typeable<"Left" | "Right">);
24
26
  export declare const Right: <L extends Type, R extends Type>(value: R) => Either<L, R>;
25
27
  export declare const Left: <L extends Type, R extends Type>(value: L) => Either<L, R>;
26
28
  export declare const isRight: <L extends Type, R extends Type>(either: Either<L, R>) => either is Either<L, R> & {
@@ -31,3 +33,4 @@ export declare const isLeft: <L extends Type, R extends Type>(either: Either<L,
31
33
  };
32
34
  export declare const tryCatch: <L extends Type, R extends Type>(f: () => R, onError: (error: unknown) => L) => Either<L, R>;
33
35
  export declare const tryCatchAsync: <L extends Type, R extends Type>(f: () => Promise<R>, onError: (error: unknown) => L) => Promise<Either<L, R>>;
36
+ export {};
@@ -3,7 +3,7 @@ import { _Iterable_ } from "../iterable";
3
3
  import { Option } from "../option/Option";
4
4
  import { Set } from "../set/Set";
5
5
  import { Typeable } from "../typeable/Typeable";
6
- export type List<A> = {
6
+ export type List<A> = ({
7
7
  add: (item: A) => List<A>;
8
8
  map: <B>(f: (a: A) => B) => List<B>;
9
9
  flatMap: <B>(f: (a: A) => _Iterable_<B>) => List<B>;
@@ -19,5 +19,5 @@ export type List<A> = {
19
19
  _tag: string;
20
20
  values: A[];
21
21
  };
22
- } & ArrayLike<A> & _Iterable_<A> & Collection<A> & Typeable<"List">;
22
+ } & ArrayLike<A>) & (_Iterable_<A> & Collection<A> & Typeable<"List">);
23
23
  export declare const List: <A>(values?: Iterable<A> | _Iterable_<A>) => List<A>;
@@ -25,7 +25,7 @@ export type Option<T extends Type> = {
25
25
  };
26
26
  toEither<E>(left: E): Either<E, T>;
27
27
  toString(): string;
28
- } & Traversable<T> & Functor<T> & Typeable<"Some" | "None">;
28
+ } & (Traversable<T> & Functor<T> & Typeable<"Some" | "None">);
29
29
  export declare const Some: <T extends Type>(value: T) => Option<T>;
30
30
  export declare const None: <T extends Type>() => Option<T>;
31
31
  export declare const Option: <T extends Type>(value: T | null | undefined) => Option<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functype",
3
- "version": "0.8.17",
3
+ "version": "0.8.19",
4
4
  "description": "A smallish functional library for TypeScript",
5
5
  "author": "jordan.burke@gmail.com",
6
6
  "license": "MIT",