... I don't know what this program does, really.
No, seriously, I think it multiplies some value by all the numbers it finds in a file and then prints the sum of the results. Anyway, moving along... >.>
The idea behind this video is to demonstrate map()
and and_then()
, two fine members of the twin Result
and Option
APIs. They perform much the same role, but they have very different ergonomics, and they can be a little tricky to use until you understand the difference. I figured I'd make a video about it because, of course, it took me awhile to grok it. :)