[Haskell-beginners] Need some understanding on this behavior.

Daniel Trstenjak daniel.trstenjak at gmail.com
Wed Feb 5 14:35:33 UTC 2020


Hi Alexander,

> And how can you create a lazy list like this [1..] without there being
> any implicit order in it?

to be able to know that the list [1..] is sorted, you would have to
encode this information into the list type and very user of the
list - like the list comprehension - would have to check this information.

At the end sorting just isn't a property of the list type.

Greetings,
Daniel


More information about the Beginners mailing list