kantan.csv
kantan.csv copied to clipboard
Parsing a cell as a NonEmptyList
Hello,
Is it possible to write a decoder for a NonEmptyList
in a generic manner? The only way I've managed to do it is defining an encoder per type. Say I have NonEmptyList
s of NonNegSeconds
and NonNegDouble
. Do I need to define an encoder for each or is there a way to do it with type parameters if I have decoders for NonNegDouble
and NonNegSeconds
in the scope already?
Thanks!