瀏覽代碼
Add case...of code
master
Julian Ospald
9 年之前
沒有發現已知的金鑰在資料庫的簽署中
GPG Key ID: 220CD1C5BDEED020
共有
1 個文件被更改,包括
6 次插入 和
0 次删除
-
common/code/Code.hs
|
|
@@ -51,3 +51,9 @@ addTwo (x:xs) = (x + 2) : addTwo xs |
|
|
|
|
|
|
|
f'' :: String -> Bool |
|
|
|
f'' xs = even . length . (\x -> x ++ "Hello world") $ xs |
|
|
|
|
|
|
|
g :: Int -> Bool |
|
|
|
g x = case x - 2 of |
|
|
|
2 -> True |
|
|
|
5 -> True |
|
|
|
x -> False |