4 ms·
The trick there is to use an explicitly polymorphic instance, which can "decide what it should have been all along" later on. I've written about the idea: https
by tonyg 9y ago
The trick there is to use an explicitly polymorphic instance, which can "decide what it should have been all along" later on. I've written about the idea: https://eighty-twenty.org/2015/01/25/monads-in-dynamically-typed-languages https://eighty-twenty.org/2015/01/25/monads-in-dynamically-t.... (OO folklore has long had some form of this idea; in limited forms, you see it in Smalltalk images stretching back decades.)