<div dir="ltr">I'm looking at <a href="https://wiki.haskell.org/99_questions/Solutions/8">this</a> and wondering how the "as pattern" actually is working<div><br></div><div>compress (x:ys@(y:_))<br>    | x == y    = compress ys<br>    | otherwise = x : compress ys<br>compress ys = ys</div><div><br></div><div>I'm sure it's just some version of my stab at eliminating consecutive duplicates in a list</div><div><br></div><div>compress :: Eq a => [a] -> [a]<br>compress [] = []<br>compress [x] = [x]<br>compress (x:y:xs) = if x == y then compress (y:xs) else x : compress (y:xs)</div><div><br></div><div>only smarter. Could someone walk me through the (x:ys@(y:_)) part?</div><div><br></div><div>LB<br><div><br></div><div><br></div></div></div>