2013-04-15 76 views

回答

8

我可能會做的兩個步驟:

conv :: Int -> String 
conv 1 = "∧" 
conv 2 = "∨" 
conv 3 = "→" 

然後就是映射是:

change :: [Int] -> [String] 
change = map conv 

change [1,2,3] -- returns ["∧","∨","→"] 

你甚至可以嵌入:

change = map conv 
    where 
    conv 1 = "∧" 
    ... 
+0

真棒謝謝你! – user2150839

相關問題