[EMAIL PROTECTED] wrote:
Having said that, I don't know of a good reason why [5,5..5] is an
infinte list of 5's.

I'm sure you know *why* it's an infinite list[1], but as for why that's useful I can't say. It has the feel of a bug in implementation, though it is ...consistent.

As for the OP, like Python, Perl also takes [m..n] to be [] when n < m. They may not be as principled as Haskell or Erlang, but it does seem to be the consensus view.


[1] Because the "5,5.." yields an (unfoldr (Just . (\x -> (x,x)) . (+0)) 5) stream but the "..5" only causes termination just as soon as the stream is surpassing 5, which it never will.

--
Live well,
~wren
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to