tcomb
tcomb copied to clipboard
Default value
So far I've seen it's only possible to define default values on the structs, but there's no possibility in other types. One option would be to add an optional default value to the maybe function, so if a value is not defined or is null, the default is returned.
Sounds reasanoble.
It also will help to avoid duplicating structure in structure itself and than it's "defaults" declaration.
I'm glad you liked my suggestion :-)