我正在查看一些 Haskell 源代码并遇到了与 的模式匹配!_
,代码在这里: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
我真的不明白“严格通配符”是如何工作的,以及为什么它对这个函数(或任何其他函数)有用。