Discussion on: [ The Art of the State ] Why it is impossible to write an Identity Function in JavaScript, and how to do it anyway

kantord profile image
Daniel Kantor

I think there's a typo in your code example:

/* Ephemeral CPS style: */
const Tuple = (...xs) => (K) => (...xs);

That's still a syntax error. I think you meant:

/* Ephemeral CPS style: */
const Tuple = (...xs) => (K) => K(...xs);

Fascinating article by the way!

rekreanto profile image
rekreanto Author

You are 100% correct! Thanks for pointing that out!