I was looking at some Haskell source code and came across a pattern match with !_
, the code is here: http://hackage.haskell.org/package/base-4.9.0.0/docs/src/GHC.List.html#unsafeTake
take n xs | 0 < n = unsafeTake n xs
| otherwise = []
-- A version of take that takes the whole list if it's given an argument less
-- than 1.
{-# NOINLINE [1] unsafeTake #-}
unsafeTake :: Int -> [a] -> [a]
unsafeTake !_ [] = []
unsafeTake 1 (x: _) = [x]
unsafeTake m (x:xs) = x : unsafeTake (m - 1) xs
I don't really understand how the "strict wildcard" works and why it's useful for this function (or any other function).