ソースを参照

Add case...of code

master
Julian Ospald 9年前
コミット
b964f22c39
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 220CD1C5BDEED020
1個のファイルの変更6行の追加0行の削除
  1. +6
    -0
      common/code/Code.hs

+ 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

読み込み中…
キャンセル
保存