add option type
change function definition syntax
make array an instance of applicative and monad