
26 Apr
2020
26 Apr
'20
10:18 p.m.
On Sun, Apr 26, 2020 at 10:26:48AM -0400, Ken Overton wrote:
I guess if I actually wanted the case all the pairs were evaluated and resulted in [Bool] where the first occurrence of an item were True, rather than multiple generators I would have two nested list comprehensions?
I am not sure I understand what you are trying to achieve, but there is always the possibility of bringing the `y` and the "filter" before the guard: uniqueInternal :: Eq a => [a] -> [(a, Int, Bool)] uniqueInternal xs = [(x,y, x `notElem` take y xs) | (x,y) <- zip xs [0..]]