Copied files from Functional Ruby gem.