Cons operator is defined (:) is defined for Array (Array.cons) and List (Cons type constructor). So to use it in the code we should either:
import Data.List (