{"blog_url":"https://blog1.mammb.com/","provider_url":"https://hatena.blog","author_name":"Naotsugu","width":"100%","image_url":null,"published":"2011-07-19 01:00:30","height":"190","version":"1.0","blog_title":"A Memorandum","description":"blog1.mammb.com \u304b\u3089\u306e\u7d9a\u304d\u3067\u3059\u3002 \u6761\u4ef6\u5f0f Haskell \u306e if \u6587\u306f\u3001\u591a\u304f\u306e\u95a2\u6570\u578b\u8a00\u8a9e\u3068\u540c\u3058\u304f\u5f0f\u3067\u3059\u3002\u3064\u307e\u308a\u3001\u306a\u3093\u3089\u304b\u306e\u5024\u3092\u8fd4\u3057\u307e\u3059\u3002\u305d\u3057\u3066 else \u90e8\u304c\u304b\u306a\u3089\u305a\u5fc5\u8981\u3067\u3059\u3002 \u6574\u6570\u306e\u7d76\u5bfe\u5024\u3092\u8fd4\u5374\u3059\u308b\u95a2\u6570\u306f\u3001\u6761\u4ef6\u5f0f\u3092\u4f7f\u3063\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002 abs :: Int -> Int abs n = if n >= 0 then n else -n \u5b9f\u884c\u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 Main> abs 1 1 Main> abs (-4) 4\u6761\u4ef6\u5f0f\u306f\u30cd\u30b9\u30c8\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b signum n if n < 0 then -1 else if n == 0 \u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog1.mammb.com%2Fentry%2F20110719%2F1311091230\" title=\"\u306f \u306f \u30cf \u30cf haskell - A Memorandum\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","provider_name":"Hatena Blog","categories":["Haskell"],"url":"https://blog1.mammb.com/entry/20110719/1311091230","author_url":"https://blog.hatena.ne.jp/Naotsugu/","title":"\u306f \u306f \u30cf \u30cf haskell"}