News for hackers. Stuff that matters.
Re:All I Want for Christmas Is These Seven TypeScript Improv... by mpoteat on Sunday December 25, 2022 @10:21PM (#34134207)
You can implement a type-aware map, reduce, filter, etc. if you use point free semantics with higher kinded types:

https://code.lol/post/programming/higher-kinded-types/

I have to admit it's a bit heavy, but this is totally representible in today's Typescript if I understand your ask correctly. It would be great if it was a more obvious / automatic inference, though.

There are no comments on this comment yet.