{"published":"2014-06-30 22:33:38","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2F2014%2F06%2F30%2FScala%25E3%2581%25AEEither%25E5%259E%258B_Left_vs_Right\" title=\"Scala\u306eEither\u578b Left vs Right - by shigemk2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","image_url":null,"blog_title":"by shigemk2","width":"100%","author_name":"shigemk2","author_url":"https://blog.hatena.ne.jp/shigemk2/","type":"rich","height":"190","categories":["Scala"],"title":"Scala\u306eEither\u578b Left vs Right","description":"Either\u306b\u3088\u308b\u30a8\u30e9\u30fc\u51e6\u7406 - \u30a8\u30e9\u30fc\u51e6\u7406\u306b\u3088\u308b\u5206\u5c90\u3092\u6e1b\u3089\u3059 | Scala Cookbook Right\u578b\u306e\u5834\u5408\u306fmap\u5185\u306e\u95a2\u6570\u3092\u9069\u7528\u3057\u3001Left\u306e\u578b\u306e\u5834\u5408\u306fmap\u306e\u51e6\u7406\u3092\u7121\u8996\u3057\u3066Left\u306e\u5185\u5bb9\uff08\u3053\u306e\u5834\u5408\u306f\u30a8\u30e9\u30fc\u60c5\u5831\u3092\uff09\u3092\u305d\u306e\u307e\u307e\u8fd4\u3059\u3002 \u74b0\u5883\u306f\u3001Mac OSX\u3068\u30012.10.3 scala> def parseInt(s:String) : Either[Exception, Int] = | try Right(s.toInt) catch { case e:Exception => Left(e) } parseInt: (s: String)Either[Exception,Int] \u2026","provider_url":"https://hatena.blog","blog_url":"https://www.shigemk2.com/","url":"https://www.shigemk2.com/entry/2014/06/30/Scala%E3%81%AEEither%E5%9E%8B_Left_vs_Right","provider_name":"Hatena Blog"}