Patterns for building instances?
Hi! Just curious how you usually go about this. Maybe I'm thinking about it wrong.
In the readme the example is
const data =
Selected.Y( Loaded.Y( Modified.Y( Saved.N( x ) ) ) )
How to you typically get from some untrustworthy api response/responses:
const res = {
selected: true,
loaded: true,
modified: 1564429334886,
saved: undefined,
};
to data
const build = ({ selected, loaded, modified, saved }) => selected ? Selected.Y(loaded ? Loaded.Y(...) : Loaded.N()) : ...
?