Hi

However this will result in a non-terminating loop for shorter [1..] [2..],
since the first two patterns of f shall never match.

The specification of your problem makes this a guarantee. How do you
know that a list is finite? You find the [] at the end. How do you
know a list is infinite? You spend an infinite amount of time and
never find the []. Hence you can't tell if you have two big lists, or
two infinite lists.

Thanks

Neil
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to