3 ms·
Add an extra generic parameter. (Also, it shouldn't be Box; you'd want a bog-standard generic newtype for this, not an extra heap allocation.)
by wizzwizz4 6y ago
Add an extra generic parameter.
(Also, it shouldn't be Box; you'd want a bog-standard generic newtype for this, not an extra heap allocation.)
- glittershark 6y agoyeah, I picked Box mostly as a pedagogical instance of the identity functor that already exists in the stdlib - in the real world you'd definitely want `struct Identity<F>(F)` instead.