以下のエントリ 「関数型Ruby」という病(6) - 関数合成と文脈、Proc#liftとProc#>=、そしてモナ に便乗して、(一部の例を)Scalaに翻訳してみるのと、ScalazのKleisliの話をします。Scalaや関数型に興味のない人は読まないほうがいいかもしれません。わざとMonadとかFunctorの用語も出します。また、もとのエントリの良し悪しとか、Rubyでああいうことをやることの是非などはあまり話しません、というか、それが主目的ではありません。とにかく便乗してScalaの話するのと、あえて元記事では避けている「関数型の用語を出した説明」を少しします。 まず、(nilはOptionを使うということにして)もとの>=の例を直訳すると以下 val f = (_: List[Int]).headOption val g = (_: Int) + 1 val h = (_:
This site is experiencing technical difficulty. We are aware of the issue and are working as quick as possible to correct the issue. We apologize for any inconvenience this may have caused. To speak with an Oracle sales representative: 1.800.ORACLE1. To contact Oracle Corporate Headquarters from anywhere in the world: 1.650.506.7000. To get technical support in the United States: 1.800.633.0738.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く