I usually try to be constructive and supportive with functional code. However, this final code looks exactly as the imperative code, except every line has a from/let in the beginning. It will be difficult to debug, requires a good amount of abstraction and will run tidy bit slower.