{"blog_url":"https://yohpapa.hatenadiary.org/","provider_url":"https://hatena.blog","description":"7.5 case\u5f0f \u5f0f\u3068\u3044\u3046\u304f\u3089\u3044\u306a\u306e\u3067\u3001\u5024\u3092\u6301\u3061\u307e\u3059\u3002 \u95a2\u6570\u306e\u5f15\u6570\u3068\u5168\u304f\u540c\u3058\u3088\u3046\u306b\u8a18\u8ff0\u51fa\u6765\u308b\u3068\u306e\u3053\u3068\u3002 \u3044\u3064\u3082\u306e\u3088\u3046\u306b\u4ed6\u611b\u306e\u306a\u3044\u4f8b\u3067\u3059\u304c\u3001\u3053\u3093\u306a\u611f\u3058\u3002 main = do print $ myCase 0 print $ myCase 101 print $ myCase 99 print $ myCase 33 myCase :: Int -> Int myCase n = case n of 0 -> (-1) n | n > 100 -> 100 | n > 50 -> 50 | otherwise -> 0 \u95a2\u6570\u5f15\u6570\u306e\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u3068\u306f\u3061\u3087\u3063\u3068\u9055\u3044\u3001\u95a2\u6570\u304c\u8a55\u4fa1\u3055\u308c\u308b\u4e2d\u3067\u5206\u5c90\u304c\u767a\u751f\u3057\u307e\u2026","categories":["haskell"],"type":"rich","provider_name":"Hatena Blog","author_name":"yohpapa","author_url":"https://blog.hatena.ne.jp/yohpapa/","blog_title":"Yohpapa\u2019s note","published":"2010-07-07 07:11:19","width":"100%","version":"1.0","url":"https://yohpapa.hatenadiary.org/entry/20100707/1278454279","title":" \u57fa\u672c\u7684\u306a\u69cb\u6587","image_url":null,"height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohpapa.hatenadiary.org%2Fentry%2F20100707%2F1278454279\" title=\" \u57fa\u672c\u7684\u306a\u69cb\u6587 - Yohpapa\u2019s note\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}