
10 Oct
2006
10 Oct
'06
10:08 a.m.
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