4 ms·
Kinda gets a little hairy if you start to add more types. Example: `//fork :: [a] ->((a -> b ), (a -> c)) -> ([b] ,[c])` `fork<A,B,C>(fn1:(el:Iterator<A>)=>B,f
by SmellyPotato22 6y ago
Kinda gets a little hairy if you start to add more types.
Example:
`//fork :: [a] ->((a -> b ), (a -> c)) -> ([b] ,[c])`
`fork<A,B,C>(fn1:(el:Iterator<A>)=>B,fn2:(el:Iterator<A>)=>C)`
- MrPatan 6y agoWhat would be the opposite of "fork", something like "zip" that gets two lists and combines them into one? Would it have a signature also starting like this: `zip<A, B, C>(...`
- SmellyPotato22 6y agoI think that about right. Although I think this is slightly different than regular zip which is [a] -> [b] -> [(a,b)] and instead would be ([a],[b]) -> [c] or if I remember currying right [a] -> [b] -> [c].