我是 Haskell 的新手,想知道语句如何
[ (x !! 0, x !! 1) | x <- mapM (const ['A', 'B', 'C'] ) [1..2], head x < head (tail x) ]
作品。(我在 StackOverflow 上找到了它。)我知道它输出什么,但我并没有真正理解它。
haskell list-comprehension
haskell ×1
list-comprehension ×1