Beginner - stepped numeric ranges question

Alright, I am beginner with Haskell. As far as I understand the information I found in a quick reference and a tutorial the following line:

[4,4…16]

Should produce a stepped numeric range containing the following [4, 8, 12, 16]. Is this correct? In ghci I get an infinite sequence containing nothing but the number four. What am I not seeing here?

EDIT:
It appears my sources failed to specify which parameter does what. Apparently the parameters are in the following order:
[start, step…end] - I assumed it was [step, start…end]

1 Like

The parameters are [start, (start+step)…end]

1 Like

Hello Peter,
maybe the reference meant [4,8..16]?

λ> [4,8..16]
[4,8,12,16]

Possibly. It could be I simply misread the reference. Anyway, I figured it out. Thank you for replying.

1 Like