It's really useful to see the logic and workings, thanks. I've been increasingly developing with a functional approach and find it quite liberating. You only find out how and why by trying it out and learning by doing.
For a really simple solution in this case could you use the Ramda ap function? ramdajs.com/0.19.1/docs/#ap
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.