-4
我不明白这是什么 “实例” 在Haskell指(在第19行):“实例” 在Haskell
16 > type Prog = [Function]
17 > data Function = Defun String String Exp
18 > -- deriving Show
19 > instance Show Function where
20 > show (Defun n p e) = "\n" ++ n ++ "(" ++ p ++ ") { return " ++ show e ++ "; }\n"
21 > showList [] = showString ""
22 > showList (f:fs) = shows f . showl fs
23 > where showl [] = showString ""
24 > showl (f:fs) = shows f . showl fs
THX。
这个问题的答案是谷歌查询“haskell实例”(haskell的一个温柔的介绍,学习你一个haskell和haskell wikibook)的第一个结果的3/6。请在stackoverflow上询问之前尽力找到答案。 – HaskellElephant