In Haskell,
> a = [1,1..]
creates an infinite list. Now I have the following
data Subunit = O | P deriving (Eq, Show)
And if I do
b :: [Subunit]
b = take 6 [P,P..]
I get the following:
parse error on input ‘]’
Why this is failing? What I need to add to be able to create an infinite list?
See Question&Answers more detail:os