Recently, I've been doing automatic testing with Haskell and QuickCheck. Some time I have got some fails, but the program retrieved [(),()]
as checked argument.
What does "[(),()]"
mean?
Recently, I've been doing automatic testing with Haskell and QuickCheck. Some time I have got some fails, but the program retrieved [(),()]
as checked argument.
What does "[(),()]"
mean?
That's a list of two ()
(or "unit") values.
Prelude> :t [(),()]
[(),()] :: [()]
Prelude> :info ()
data () = () -- Defined in ‘GHC.Tuple’
A list is not an array; an array is flat, with constant-time indexing. A list is a nested recursive type.