
28 Dec
2011
28 Dec
'11
2:37 p.m.
On Wed, Dec 28, 2011 at 07:51:35PM +0100, Stanisław Findeisen wrote:
Hi
Is list range (for example: [1..10]) a language construct or a function? What type does it have?
[ 1 .. 10 ] is syntatic sugar for the function application enumFromTo 1 10 enumFromTo is a method of the class Enum. Its type is enumFromTo :: Enum a => a -> a -> [a] There is also enumFrom, enumFromThen and enumFromThenTo. Romildo