fpinscala/fpinscala — pull request #350 by astorije (2014-12-30 04:58:40+00:00)
Title: [Exercise 4.5] Add sequenceViaTraverse

Exercise 4.5 says:

> In fact, implement sequence in terms of traverse.

The hint in the repo also says:

> Implementing `sequence` using `traverse` may be more trivial than you think.

This is quite a teaser! The answer is simple indeed but one can try more complicated solutions without trying out the obvious, so I think it would be nice to add the solution in the answers.
Also, I was trying to find a nicer way than `(x => x)` but couldn't find anything, so correct me if I am wrong.

In addition, my text editor removed the trailing whitespaces of the 2 files. I think it's an improvement overall, but I split the commit in 2 in case you want me to get rid of it.