Valéry wrote :
>Consider for instance :
>l p = [f x \\ x <- [1..] | (f x) rem 2 == 0 && p (f x)]
>Is there some way to define y = f x once instead of 3 times ?
Yes, this was added in Clean 2.1.1:
l p = [ y \\ x <- [1..],
let y = f x
| f x rem 2 == 0 && p y
]
Regards,
John van Groningen