Re:Understanding the Type of ‘call/cc’
by remcob on Thursday December 13, 2018 @11:12AM
(#18673394)
Look at the two examples where k is used with β being a String or a List. And now combine the two examples, this would force β to be simultaneously String and List -- impossible. A type parameter is not what we want here.
The return type of the continuation is better captured by something like the Bottom type from Haskell:
The return type of the continuation is better captured by something like the Bottom type from Haskell:
https://wiki.haskell.org/Bottom
In particular, "Bottom is a member of any type", which is what solves my example above.