Solved some functional programming problems on HackerRank