タグ

型とelmに関するigrepのブックマーク (2)

  • A reckless introduction to Hindley-Milner type inference

    (I've been editing this post on and off for almost a year. I'm not really happy with it, but I suspect I never will be.) Several months ago I gave a talk at work about Hindley-Milner type inference. When I agreed to give the talk I didn't know much about the subject, so I learned about it. And now I'm writing about it, based on the contents of my talk but more fleshed out and hopefully better expl

    igrep
    igrep 2019/09/12
    わかりやすい。例は全てElmのようなのでElmユーザーによい入門ではないか。
  • Elmで体験する関数型言語の面白さ - Qiita

    ElmフロントエンドのWebApplicationのフレームワークを内蔵したDSL言語です。シンプルながら高機能なElm言語は言語の分類として純粋関数型言語という枠組みに含まれます。そのシンプル故に快適というElmでの開発の特徴は純粋関数型言語の特性でもあるように思います。なので、他の言語をやっている人に純粋関数型言語の魅力を伝えるべくこの記事を書きました。では早速Elmの世界をのぞいてみましょう。 定義と型と値と関数 Elmでは、以下のようにして関数や値の定義をします。 -- valを123として定義 val = 123 -- strをString型の"hoge"という文字列として定義 str : String str = "hoge" -- numberを引数にとってnumberにする関数の定義 twice : number -> number twice n = n * 2 --

    Elmで体験する関数型言語の面白さ - Qiita
    igrep
    igrep 2018/12/11
  • 1