Not your computer? Use a private browsing window to sign in. Learn more about using Guest mode
Not your computer? Use a private browsing window to sign in. Learn more about using Guest mode
ACM SIGPLAN Workshop on ML Sunday, 18 September 2011, Tokyo, Japan (co-located with ICFP) The ML family of programming languages includes dialects known as Standard ML, Objective Caml, and F#. These languages have inspired a large amount of computer-science research, both practical and theoretical. This workshop aims to provide a forum for discussion and research on ML and related technology (high
PPLでの質問にも関連するのですが、意外と周知というわけでもないようなので、簡単にメモしてみました。MinCamlでも実装されていないことですし(某所のコンパイラ演習の課題にはなっていますし、私が学部4年生だったときの演習課題にもありましたが)、サーベイ論文やチュートリアルにするほどのことではないので…。もし私の勘違いがあったら是非ともご指摘を(実はそれが目的です)。 ML(やHaskellなど)には、たとえばOCamlの文法で let f x y = yと定義すると val f : 'a -> 'b -> 'b = <fun>と型推論され、 # f "abc" 123 ;; - : int = 123 # f 4.5 67.89 ;; - : float = 67.89のように任意の型の値に対して適用できる「多相関数」(polymorphic function)があります。JavaやC#
http://d.hatena.ne.jp/succeed/20061026#1161853372 知っていて書いている:-)のかもしれませんが、これ↓を「きちんと動く」とは言えない、という考え方なのでしょう。 # let f x y = (x, y) ;; val f : 'a -> 'b -> 'a * 'b = <fun> # let f1 = f 1 ;; val f1 : '_a -> int * '_a = <fun> # f1 2 ;; - : int * int = (1, 2) # f1 ;; - : int -> int * int = <fun> # f1 true ;; Characters 3-7: f1 true ;; ^^^^ This expression has type bool but is here used with type int参考: > s
直しました。擬似コードも。発見・修正&報告多謝。なぜかトラックバックは来ていませんでしたが、僕の見落としか設定ミスでしょうか…? 追記:なにやらこちらからのトラックバックも失敗します。一回目はread time outとか何とか言われ、二回目以降は http://app.blog.livedoor.jp/azounoman/tb.cgi/50232574 へのトラックバックに失敗しました。 (302 Found)だそうで…。はてなのせい? ちなみに、ちょっと前にも書きましたが、K正規形の元になったA正規形の元になったCPSはSSAより遥かに先ですよう(1974年)。で、CPSとSSAは大体等価という。あとK正規形も僕が考えたわけじゃないです。ML Kitから来ているので… あとレイトレのオリジナルはPascalじゃなくてBASICだったかと(だからMLに移植しても再帰がすべて末尾だったので
This is a preliminary translation of the book Développement d'applications avec Objective Caml by Emmanuel Chailloux, Pascal Manoury and Bruno Pagano, published by O'Reilly France. The translation is available in several formats: HTML for online reading. PDF in one big file (3 megabytes). PDF, one file per chapter. The translation is not entirely finished yet; in particular, some solutions to exer
Studying equivalently cutdown versions of our ray tracer written in C++ and OCaml is a great way to learn the differences between C++ and OCaml. This web page presents two versions of the same ray tracer, written in C++ and OCaml, and compares the code used to implement equivalent functionality in these two languages. The chosen ray tracer is particularly well suited to this task because it involv
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く