The type of [] is polymorphic, i.e. forall t. [t], meaning it represents an empty list of any type t. Since test is of type [[Int]], we can unify t ~ [Int] and therefore [] is an empty list of type [[Int]] also.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more