You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
Is there a specific reason why the package doesn't provide implementations for basic operations? Are there any plans for adding them in the future? I ended up writing some implementations for these types since I needed to work with tuples. Perhaps the types could be contributed to fp-ts Tuple module if they had an implementation? See gcanti/fp-ts#1074
The text was updated successfully, but these errors were encountered:
I mean the package has a type Concat but it does not provide a function concat to perform the concatenation according to that type. Maybe there are several different ways to do concatenation but it would be nice to have the straight forward implementation out of the box. Because that lets you avoid type casts in your code.
Here is an example implementation for the constructor function concat that constructs a Concat.
import{Concat}from'typescript-tuple';// This should be available in the librarytypeTuple=Array<any>;exportconstconcat=<AextendsTuple,BextendsTuple>(a: A,b: B): Concat<A,B>=>(a.concat(b)asunknown)asConcat<A,B>;// To let you do thistypeFoo123=['foo',123];typeBar456=['bar',456];constfoo123: Foo123=['foo',123];constbar456: Bar456=['bar',456];constfoo123bar456: Concat<Foo123,Bar456>=concat(foo123,bar456);`
Is there a specific reason why the package doesn't provide implementations for basic operations? Are there any plans for adding them in the future? I ended up writing some implementations for these types since I needed to work with tuples. Perhaps the types could be contributed to fp-ts Tuple module if they had an implementation? See gcanti/fp-ts#1074
The text was updated successfully, but these errors were encountered: