I'm reading through Real World Haskell, and am trying to understand the as-pattern.
From the book (Chapter 4):
suffixes :: [a] -> [[a]]
suffixes xs@(_:xs') = xs : suffixes xs'
suffixes _ = []
The book explains the @ symbol thus,
"...bind the variable xs to the value that matches the right side of the @ symbol."
I'm having trouble understanding this explanation. Supposing I call
suffixes "hello"
Explicitly, what would the above line with the @ do to this (on the first iteration)? I know what the result of the function is, but cannot see how we get there from the above code.