Add implementations for problem 2 in Objective-C, Erlang, Go, and Haskell