21 ms·
>Admittedly I don't really understand your construction. It is quite simple. Instead of accepting a concrete type `Foo`, the function is changed to accept type
by qsera 6mo ago
>Admittedly I don't really understand your construction.
It is quite simple. Instead of accepting a concrete type `Foo`, the function is changed to accept types that can be converted to `Option<Foo>`. Since both `Foo` and `Option<Foo>` can be converted to `Option<Foo>`, the existing call sites that passes `Foo` would not require changing.
https://play.haskell.org/saved/g4idq2zv https://play.haskell.org/saved/g4idq2zv