Replacing Nothing values with Just values in a nested structure
<p>
This is what I expect will become the first of a series of posts where
I detail some of the solutions I've arrived at, based on the test
programs that I've written to work through the problem.</p>
<p>
The situation I was running into was this:</p>
<p>
I was writing tests for some parsing code. The output of the parse was
a nested data structure. Some (well, many) parts of the data structure
were optional. One in particular was giving me a hard time,
though—it was a default being set from a dynamic value being passed
into the parser. Obviously I had to get that same dynamic value into
the test data as well, in order for them to match.</p>
3 minutes to read
Michael Alan Dorman