【发布时间】:2013-03-07 18:29:52
【问题描述】:
这是我被分配调试的 Haskell 程序的一部分:
process :: Sentence -> IO ()
process this@(Sentence string _) = do
render string
render "==>"
render $ translate this
render = putStrLn
data Sentence = Sentence String Task
translate :: Sentence -> String ; Incomplete Definition
translate (Sentence string task)
| ...
| ...
| ...
| ...
这个程序中唯一我不理解或不认识的部分是process this@(Sentence string _) = do这一行
我以前从未见过this@,我也不太确定(Sentence string _) 中的下划线是什么意思。
【问题讨论】:
标签: haskell