
26 Jul
2014
26 Jul
'14
10:03 p.m.
On 26/07/14 22:55, Henk-Jan van Tuyl wrote:
You can define (\\) as follows, terminating in case of the samples you gave:
Yes, that's what I mean. Why is it not defined like that?
but this will not terminate in cases like: [0] \\ [1..]
Yes, this of course not terminate because it has to search for a 0 in the second list, which takes forever. But my question was about the first case: Was it intended (or is it specified) that (\\) cannot work on infinite lists? Otherwise maybe your implementation should replace the current one?