This website is a set of practical, detailed tutorials for people who want to learn Objective CAML (often known as just "OCaml"). OCaml is a
ocaml-tutorial.org/ - 19 Mar 2009
Add a parameter to a function a) Implement dicho_0 that finds x in the interval ]a,b[ such as f(x) = 0, using the dichotomic method: let rec dicho_
ocaml-tutorial.org/add_a_parameter_to_a_function - 19 Nov 2005
I live in Saint-Etienne , France. My hobbies are lego building and OCaml programming. If the OCaml-tutorial exercices are too much difficult then i am
ocaml-tutorial.org/brickcaster - 19 Jul 2005
Chapters 12 and 13 really need to be rewritten from scratch. I've left them here - you can read them, but the formatting is screwy.
ocaml-tutorial.org/calling_c_libraries - 19 Nov 2005
Calling Fortran libraries Fortran isn't a language the many people write new codes in but it still is in extensive use in the scientific communities. Man
ocaml-tutorial.org/calling_fortran_libraries - 18 Jul 2007
Camlp4 , the Caml "pre-processor pretty printer" is an advanced macro system which allows complex abstract syntax tree transformations on ocaml pro
ocaml-tutorial.org/camlp4_3.10 - 08 Oct 2007
This is a tutorial that guides you, step by step, how to write syntax extension using Camlp4 in Objective CAML. The example we present in this tutorial should
ocaml-tutorial.org/camlp4_3.10/foreach_tutorial - 20 Aug 2007
dynamic_functor_example.ml: type t1 = A | B type t2 = Foo of string * t1 open Camlp4 module Id = struct (* Information for dynamic loading *) let name =
ocaml-tutorial.org/camlp4_3.10/dynamic_functor_example.ml - 11 Apr 2007
dynamic_old_syntax.ml: type t1 = A | B type t2 = Foo of string * t1 open Pcaml let foo = Entry.mk gram "foo" let bar = Entry.mk gram "bar&qu
ocaml-tutorial.org/camlp4_3.10/dynamic_old_syntax.ml - 11 Apr 2007
quick_non_extensible_example.ml (* This scheme only works when the grammar value is not really used for other things than entry creation. In fact gramma
ocaml-tutorial.org/camlp4_3.10/quick_non_extensible_example.ml - 11 Apr 2007
static_functor_example.ml type t1 = A | B type t2 = Foo of string * t1 open Camlp4.PreCast module Lexer = struct ... if you need a different lexer ... en
ocaml-tutorial.org/camlp4_3.10/static_functor_example.ml - 11 Apr 2007
static_old_syntax.ml: type t1 = A | B type t2 = Foo of string * t1 module Gram = Grammar.GMake(...) let foo = Gram.Entry.mk "foo" let bar = Gram.
ocaml-tutorial.org/camlp4_3.10/static_old_syntax.ml - 11 Apr 2007
This is a short tutorial for those who are writing their first OCaml program and are wondering how to read arguments that are passed on the command line.
ocaml-tutorial.org/command-line_arguments - 28 Nov 2006
This page gives a list of quick explanations for some error or warning messages that are emitted by the OCaml compilers. Longer explanations are usually given
ocaml-tutorial.org/common_error_messages - 22 Mar 2007
This is a rough comparison of the different container types that are provided by the OCaml language or by the OCaml standard library. In each case, n is the n
ocaml-tutorial.org/comparison_of_standard_containers - 26 Aug 2006
The core OCaml distribution provides the ocamlc and ocamlopt compilers. Using them directly is fine, but if you are using third party libraries, you shoul
ocaml-tutorial.org/compiling_ocaml_projects - 18 Jan 2007
OCamlMakefile is a generic Makefile that greatly facilitates the process of compiling complex OCaml projects. For a basic OCaml program or library that d
ocaml-tutorial.org/compiling_with_gnu_make - 06 Nov 2006
Here is the summary on how to compile an OCaml program with OMake . It produces a native code executable or a bytecode executable if ocamlopt is not availabl
ocaml-tutorial.org/compiling_with_omake - 01 Nov 2006
This tutorial is copyright © by the original contributors. Everything contributed by Merjis is PUBLIC DOMAIN.
ocaml-tutorial.org/copyright - 25 Nov 2006
As with Perl, OCaml has support for lists built into the language. All elements of a list in OCaml must be the same type. To write a list, use: [1; 2; 3]
ocaml-tutorial.org/data_types_and_matching - 10 Oct 2006
In OCaml werden Kommentare von (* und *) umschlossen. Beispiel: (* Dies ist ein einzeiliger Kommentar. *) (* Dies ist ein * mehrzeiliger * Kommentar
ocaml-tutorial.org/die_grundlagen - 27 Nov 2006
This area is for discussion of major editing changes to existing content. For example, if you want to restructure how existing chapters are arranged, pleas
ocaml-tutorial.org/discussion - 14 Dec 2006
This is a guide to basic file manipulation in OCaml using only what the standard library provides. Official documentation for the modules of interest: Perv
ocaml-tutorial.org/file_manipulation - 28 Nov 2006
This is a reference to the standard filenames and extensions used by various parts of the OCaml build system. Note: There is an extended mailing list pos
ocaml-tutorial.org/filenames - 24 Sep 2008
We've got quite far into the tutorial, yet we haven't really considered functional programming . All of the features given so far - rich data types, pattern
ocaml-tutorial.org/functional_programming - 15 Mar 2007
OCamlMakefile は、 複雑なOCamlプロジェクトのコンパイル作業をとても楽にする生成的な Makefile だ。 標準のライブラリのみを使う基本的なOCamlプログラムやライブラリについては、 単にカレントディレクトリにOCamlMakefileをコピーし、 以下の Makefile を作成�
ocaml-tutorial.org/gnu_make_でのコンパイル - 08 Nov 2006
As with all modern languages, OCaml provides a garbage collector so that you don't need to explicitly allocate and free memory as in C/C++. As JWZ writes in
ocaml-tutorial.org/garbage_collection - 19 Nov 2005
Generate cuboids a) Let mult be a product function and unit be its neutral element. Implement the power_function that uses this product: let
ocaml-tutorial.org/generate_cuboids - 11 Jul 2005
Generate rectangular parallelepipeds a) Let mult be a product function and unit be its neutral element. Implement the power_function that uses thi
ocaml-tutorial.org/generate_rectangular_parallelepipeds - 15 Jul 2005
array : a predefined container type of fixed length which is mutable and unlike lists supports efficient random access. See also list . bytecode : low-l
ocaml-tutorial.org/glossary - 08 Mar 2006
Module Hashtbl The Hashtbl module implements an efficient, mutable lookup table. To create a hash table we could write: let my_hash = Hashtbl.create
ocaml-tutorial.org/hashtbl - 10 Dec 2005
OCaml has an if statement with two variations, and the obvious meaning: if boolean-condition then expression if boolean-condition then expression else
ocaml-tutorial.org/if_statements,_loops_and_recursion - 07 Jan 2008
Ocaml은 다음 두가지 형태의 명백한 의미의 if 문이 있다: if boolean-condition then expression if boolean-condition then expression else other-expression 여태까지 사용해왔던 다른 �
ocaml-tutorial.org/if_문,_루프,_재귀 - 17 Sep 2008
OCaml には if 文が2種類ある、といっても別に変な意味ではない: if 真偽の条件 then 式 if 真偽の条件 then 式 else 他の式 使い慣れた在来の言語とは違って、if 文は実は式である。言いかえれば、いわゆる if 文によりも、 真偽の条件 ? 式 : �
ocaml-tutorial.org/if文、ループと再帰 - 06 Dec 2006
Implement an inventory facility Implement the following module: module Inventory : sig type 'a inventory = ('a * int) list val valid : 'a inv
ocaml-tutorial.org/implement_an_inventory_facility - 17 Feb 2006
Chapters 12 and 13 really need to be rewritten from scratch. I've left them here - you can read them, but the formatting is screwy.
ocaml-tutorial.org/introduction_to_gtk - 21 Aug 2006
(unfinished)
ocaml-tutorial.org/labels - 02 Jul 2005
Ledit is an OCaml readline replacement, capable of being used either as a standalone wrapper for line-based interactive programs, or included in your progra
ocaml-tutorial.org/ledit - 07 Apr 2007
The Ledit readline-replacement program can be built into a library automatically for use in your own projects with the following Makefile: OCAMLMAKEFILE
ocaml-tutorial.org/ledit_with_ocamlmakefile - 07 Apr 2007
The tutorial below is also a valid CDuce program. You can save it as "tutorial.cd" in a fresh directory and learn...
ocaml-tutorial.org/manipulating_xml_documents_with_cduce - 17 Oct 2006
Module Map Map creates a "mapping". For instance lets say I have some data that is users and their associated passwords. I could with the Map
ocaml-tutorial.org/map - 12 Jul 2006
I work as a consultant for Wink.com . I am already involved in way too many OCaml activities, but I couldn't resist the temptation of starting a trans
ocaml-tutorial.org/martin_jambon - 31 Jul 2007
In OCaml, every piece of code is wrapped into a module. Optionally, a module itself can be a submodule of another module, pretty much like directories in a fi
ocaml-tutorial.org/modules - 11 Sep 2008
This page is for asking (and answering) real beginners questions about OCaml. If you just have a question, it's probably best to ask it on the ocaml_beginn
ocaml-tutorial.org/newbie_faq - 19 Nov 2005
Page principale | Version originale en anglais
ocaml-tutorial.org/notions_de_base - 02 Feb 2008
So you've got a survey on your website which asks your readers for their names and ages. Only problem is that for some reason a few of your readers don't want
ocaml-tutorial.org/null_pointers,_asserts_and_warnings - 26 Oct 2006
Like any other language, Objective Caml can be used to write CGI programs. The advantages of using OCaml for CGI scripting are the same a using OCaml for pro
ocaml-tutorial.org/ocaml_and_the_web - 05 Mar 2007
OCaml 프로그램의 구조 지금부터는 실제 OCaml 프로그램 몇 개를 통해 좀 더 높은 차원에서 OCaml을 살펴보려 한다. 지역 정의(definition)와 전역 정의, ;; vs. ; , 모듈(module), 중첩함수(nested function), 레퍼런스(ref
ocaml-tutorial.org/ocaml_프로그램의_구조 - 02 Feb 2007
他の言語同様、Objective Caml でも CGI プログラムを書ける。 OCaml で CGI スクリプトを書くことは、 他のプログラムで OCaml を使うのと同じ利点がある。 欠点は、OCaml 向けの CGI ライブラリがほとんどない事実だ。 個人的には OCamlNet library の中の�
ocaml-tutorial.org/ocamlでwebプログラミング - 29 Nov 2006
このウェブサイトはOCamlを学ぼうとする人たちの為の実際的で詳細なチュートリアルを集めたものである。 よく知られている通り、OCamlはアプリケーション開発のための高速、簡潔かつ強力な言語である。ここでは読者がすでにOCamlの処理系をインストールしているものと仮定する。インストールの方法については英�
ocaml-tutorial.org/ocamlチュートリアル - 06 Feb 2007
さて、ここからは、俯瞰的に、実際のOCamlプログラムを見ていくことにしよう。ここで述べるのは、ローカル&グローバルな定義、 ;; と ; の使い分け、モジュール、入れ子関数、そして参照についてである。進むにつれ、今まで見たことがなくて意味のわからないOCamlの概念が、たくさん出てくるだろう。今はつぶさにわからな�
ocaml-tutorial.org/ocamlプログラムの構造 - 31 Jan 2007
OCaml のコアディストリビューションには ocamlc と ocamlopt コンパイラが含まれる。 これらを直接使うのもよいが、 もしサードパーティ製のライブラリを使うのなら、 ライブラリがシステムのどこにインストールされたのかを 気にする必要を抑えてくれる ocamlfind フロントエ�
ocaml-tutorial.org/ocamlプログラムをコンパイルする - 29 Jan 2007
和别的编程语言一样,OCaml可以被用于CGI程序。这样做的好处和一般的Ocaml编程一样。不足在于Ocaml并没有多少CGI库可用。我所想到的一个CGI库在 OCamlNet library 项目中。
ocaml-tutorial.org/ocaml和web - 24 May 2007
本站为对 Objective CAML (通常称作"OCaml")感兴趣者提供一套实用而详尽的教程。 OCaml是一种快速、简洁、而强大的应用程序开发语言--我想大家也许已经知道这一点了,而且已经安装了OCaml。如果没有的话,大家可以在 main OCaml webpages 或�
ocaml-tutorial.org/ocaml教程 - 23 May 2007
ここでは OCaml プログラムを OMake でコンパイルする方法を要約した。 OMake は、findlib(ocamlfind)で管理される標準ライブラリと同じく、 camlp4 構文ライブラリを使っているOCamlファイルや、 ocamllex, ocamlyacc を用いて, ネィティブコードの実行フ�
ocaml-tutorial.org/omake_でのコンパイル - 05 Nov 2006
OCaml is an object-oriented, imperative, functional programming language :-) It mixes all these paradigms and lets you use the most appropriate (or most famil
ocaml-tutorial.org/objects - 18 Dec 2006
现在我们将从整体上观察一些OCaml程序。我将传授以下内容:局部和全局定义,何时使用 ;; 而何时用 ; ,模块,嵌套函数,以及引用。为此我们会见到很多现在还不理解意义的目前还未接触过的OCaml概念。不用担心这些细节,只要专注于程序的整体形状以及我指出的那些特性。 局部"变量"( 实际是
ocaml-tutorial.org/ocaml程序的结构 - 15 Jul 2008
Discussion on this page
ocaml-tutorial.org/performance_and_profiling - 19 Nov 2005
There are some serious mistakes in the last paragraph: Dynamic method dispatch itself is seldom a performance problem. In languages without multiple inhe
ocaml-tutorial.org/performance_and_profiling/discussion - 30 Jul 2005
The intent of this page is to give hints on how to write more elegant OCaml programs, from simple formatting issues to the choice between functional, imperati
ocaml-tutorial.org/programming_style - 05 Jul 2006
Answers to all of these questions exist somewhere in the archive ocaml-beginners mailing-list: how to choose record field names (or how to avoid name clash
ocaml-tutorial.org/programming_style/discussion - 19 Nov 2005
Resources for OCaml beginners.
ocaml-tutorial.org/resources - 12 Mar 2007
I work at Merjis Ltd. , based in London, UK, where we work on improving website return on investment by having a mix of good marketing and excellent unde
ocaml-tutorial.org/richard_w.m._jones - 14 Jul 2005
This is a sandbox where you can try out editing. You can write anything you like here, but please leave this first section (these instructions) intact.
ocaml-tutorial.org/sandbox - 21 Mar 2007
Module Set To make a set of strings: module SS = Set.Make(String);; To create a set you need to start somewhere so here is the empty set let s
ocaml-tutorial.org/set - 20 Nov 2005
Hashtbl Set Map See also: Comparison of Standard Containers
ocaml-tutorial.org/standard_library_examples - 26 Aug 2006
Streams are very powerful and concise once the necessary tools (stream builders, combinators, and other utilities) are in place. However, the code behind thes
ocaml-tutorial.org/stream_expressions - 19 Mar 2009
Suppose you need to process each line of a text file. One way to do this is to read the file in as a single large string and use something like Str.split to
ocaml-tutorial.org/streams - 19 Mar 2009
Page principale | Version originale en anglais Cette page a pour objectif de donner des conseils pour programmer de façon élégante en OCaml, du formatag
ocaml-tutorial.org/style_de_programmation - 17 Jul 2006
OCaml comments are delimited by (* and *) , like this: (* This is a single-line comment. *) (* This is a * multi-line * comment. *) In other wor
ocaml-tutorial.org/the_basics - 01 Feb 2008
Now we're going to take some time out to take a high-level look at some real OCaml programs. I want to teach you about local and global definitions, when to u
ocaml-tutorial.org/the_structure_of_ocaml_programs - 31 Jan 2008
Ce site web est un ensemble de tutoriels pratiques et détaillés pour les gens qui veulent apprendre Objective Caml , "OCaml" en abrégé. OCaml est
ocaml-tutorial.org/tutoriel_objective_caml - 01 Sep 2008
Comme en Perl, la notion de liste est directement supportée dans le langage OCaml. En OCaml, tous les éléments d'une liste doivent avoir le même type. Une lis
ocaml-tutorial.org/types_de_données_et_matching - 03 Feb 2008
Write a binary-predicate list test A binary-predicate is a function that tests a relation between two arguments. A binary-predicate has the general signat
ocaml-tutorial.org/write_a_binary-predicate_list_test - 19 Nov 2005
Write a dyadic-predicate list test A dyadic-predicate is a function that tests a relation between two arguments. A dyadic-predicate has the signature:
ocaml-tutorial.org/write_a_dyadic-predicate_list_test - 11 Jul 2005
Write a list circularity test a) Implement implication_string that tests if a string is an implication of the form "P=>Q" where P and Q a
ocaml-tutorial.org/write_a_list_circularity_test - 19 Nov 2005
Write a list generator a) Write the constructor build_list that gives n first items of the recurrent series u , a being the list of the base case
ocaml-tutorial.org/write_a_list_generator - 19 Nov 2005
Diese Website ist eine Sammlung praktischer, detaillierter Anleitungen für alle, die gerne Objective CAML (oft nur als "OCaml" bezeichnet) ler
ocaml-tutorial.org/de - 05 Dec 2006
Diese Website ist eine Sammlung praktischer, detaillierter Anleitungen für alle, die gerne Objective CAML (oft nur als "OCaml" bezeichnet) ler
ocaml-tutorial.org/de/ - 27 Nov 2006
In OCaml werden Kommentare von (* und *) umschlossen. Beispiel: (* Dies ist ein einzeiliger Kommentar. *) (* Dies ist ein * mehrzeiliger * Kommentar
ocaml-tutorial.org/de/the_basics - 13 Feb 2008
Cette page fournit une brève explication à propos de certains messages d'erreurs ou d'avertissements des compilateurs OCaml. De plus amples informations sont
ocaml-tutorial.org/fr/common_error_messages - 01 Sep 2008
Nous sommes arrivé relativement loin dans ce tutorial et nous n'avons pas encore abordé la programmation fonctionnelle . Il serait imaginable de voir toutes
ocaml-tutorial.org/fr/functional_programming - 11 Nov 2007
fr/if_statements,_loops_and_recursion is
ocaml-tutorial.org/fr/if_statements,_loops_and_recursion - 17 May 2007
Usage standard Avec OCaml, tout programme est contenu dans un module. Un module peut même être , plus rarement, un sous-module d'un autre, à la manière d'un
ocaml-tutorial.org/fr/modules - 01 Sep 2008
Supposons que votre site web dispose d'un sondage, demandant à vos lecteurs leurs noms et leurs âges. Le problème, c'est que pour une raison quelconque certai
ocaml-tutorial.org/fr/null_pointers,_asserts_and_warnings - 26 Oct 2006
Maintenant nous allons passer un peu de temps à observer la structure d'ensemble de quelque vrais programmes en OCaml. Je veux vous parler des définitions loc
ocaml-tutorial.org/fr/the_structure_of_ocaml_programs - 02 Mar 2008
Questo sito è un insieme di tutorial pratici e dettagliati per chi vuole imparare Objective CAML (spesso noto semplicemente come "OCaml"). O
ocaml-tutorial.org/it/tutorial_su_objective_caml - 07 Mar 2006
Così come Perl, OCaml ha il supporto per le liste implementato nel linguaggio. Tutti gli elementi di una lista in OCaml devono essere dello stesso tipo. Per s
ocaml-tutorial.org/it/data_types_and_matching - 06 Mar 2006
Ci siamo inoltrati abbastanza nel tutorial, ma ancora non abbiamo realmente considerato la programmazione funzionale . Tutte le caratteristiche date finora -
ocaml-tutorial.org/it/functional_programming - 10 Mar 2006
OCaml ha un'istruzione if con due variazioni, e l'ovvio significato: if condizione-booleana then espressione if condizione-booleana then espressione e
ocaml-tutorial.org/it/if_statements,_loops_and_recursion - 21 Mar 2006
(da finire)
ocaml-tutorial.org/it/labels - 13 Apr 2007
Allora, avete fatto un sondaggio sul vostro sito che chiede ai vostri lettori i loro nomi e le loro età. L'unico problema è che per qualche motivo alcuni vost
ocaml-tutorial.org/it/null_pointers,_asserts_and_warnings - 01 Jul 2006
it/objects is
ocaml-tutorial.org/it/objects - 07 Jan 2008
In OCaml i commenti sono delimitati da (* e *) , come segue: (* Questo è un commento su un'unica riga. *) (* Questo è un * commento su * più righe.
ocaml-tutorial.org/it/the_basics - 20 Feb 2006
Ci prenderemo ora del tempo per dare uno sguardo ad alto livello a qualche programma OCaml reale. Voglio istruirvi sulle definizioni locali e globali, su quan
ocaml-tutorial.org/it/the_structure_of_ocaml_programs - 03 Mar 2006
Hashtbl モジュールは効率的な変更可能ルックアップテーブルで実装されている。 ハッシュ表を作成するにはこう書く: let my_hash = Hashtbl.create 123456;; 123456 は hashtbl の初期サイズだ。 この初期値は単純にハッシュ表に載せるデータ�
ocaml-tutorial.org/ja/hashtbl - 23 Feb 2007
Map は「マッピング(写像)」を作成する。 例えば、 ユーザーとユーザーに関連づけられたパスワードからなるデータがあるとしよう。 Map モジュールでユーザー名からそのパスワードへの写像を作成できる。 Map モジュールは単にこれをするのではなく、とても効率的に行う。 また関数的方法で行う。 以下の例�
ocaml-tutorial.org/ja/map - 17 Jan 2007
文字列の集合を作るには: module SS = Set.Make(String);; 集合を作るには、どこかからはじめないといけない。 そのために空集合がある: let s = SS.empty;; または、はじめの要素が分かっているのなら、 集合は次のように作れる: let s
ocaml-tutorial.org/ja/set - 12 Jan 2007
ja/calling_c_libraries is
ocaml-tutorial.org/ja/calling_c_libraries - 27 Jan 2007
アドレス 現在、アドレスが、 http://www.ocaml-tutorial.org/ocamlプログラムの構造 などとなっているが、他の語に合わせて http://www.ocaml-tutorial.org/ja/the_structure_of_ocaml_programs
ocaml-tutorial.org/ja/discussion - 06 Feb 2007
ja/introduction_to_gtk is
ocaml-tutorial.org/ja/introduction_to_gtk - 27 Jan 2007
OCamlのコメントは (* と *) で囲まれた部分である。 (* これは一行だけのコメント *) (* これは * 複数行に渡る * コメント *) 別の言い方をすると、コメントの仕方はCに昔からあるコメント文によく似ている。( /* ... */ ) また (Perl の #.
ocaml-tutorial.org/ja/the_basics - 12 Jan 2007
이 웹사이트는 Objective CAML (흔히 "OCaml"로 알려져 있음)을 배우고자 하는 사람들에게 실용적이면서 자세한 튜토리얼을 제공한다. OCaml은 응용 프로그램 개발을 위한 빠르고, 간결하며 강력한 언어다. 이 튜토리얼은 여러분이 이미 이 사실을 �
ocaml-tutorial.org/ko - 11 Sep 2008
이 웹사이트는 Objective CAML (흔히 "OCaml"로 알려져 있음)을 배우고자 하는 사람들에게 실용적이면서 자세한 튜토리얼을 제공한다. OCaml은 응용 프로그램 개발을 위한 빠르고, 간결하며 강력한 언어다. 이 튜토리얼은 여러분이 이미 이 사실을 �
ocaml-tutorial.org/kr - 04 Jan 2007
"It's hard to know exactly how useful this is in practice, since I've never had cause to write mutually recursive functions, nor have I been able to thin
ocaml-tutorial.org/labels/discussion - 24 Jul 2005
"range patterns" are mentionned in this page, but I think what's shown is really what the user manual calls " Or patterns ". (I'd call &qu
ocaml-tutorial.org/null_pointers,_asserts_and_warnings/discussion - 26 Oct 2006
This page would be extremely useful if it were accurate and complete. I am not too much into web technologies myself, so if anyone who is more experienced in
ocaml-tutorial.org/ocaml_and_the_web/discussion - 05 Jun 2006
Discussion regarding presentation of OCaml on the page The Basics Do we need to put recursive functions in this basic page? Aren't they a bit advanced f
ocaml-tutorial.org/the_basics/discussion - 07 Jan 2008
I'm a bit uneasy with the way = and == are used in the example. Specially to the C-trained eye, it will look like "= is used for declarations and == is
ocaml-tutorial.org/the_structure_of_ocaml_programs/discussion - 31 Jan 2008
このページでは、 OCamlコンパイラが出すエラーや警告メッセージからいくつかについて短く説明していく。 長い説明はたいていチュートリアルの専用のセクションにあるだろう。
ocaml-tutorial.org/よくあるエラーメッセージ - 25 Nov 2006
OCamlはオブジェクト指向、命令型、関数型言語だ :-)。 これらのパラダイムを混ぜて、 手元の仕事にもっともふさわしい(あるいは慣れた) プログラミングパラダイムが使える。 本章では OCaml でのオブジェクト指向プログラミングに注目するが、 何故オブジェクト指向のプログラムを書きたいか、 あるいは書きたくな�
ocaml-tutorial.org/オブジェクト - 23 Feb 2007
現代的言語がすべてそうであるように、 OCaml にはガベージコレクタ(GC)があるので、 C/C++ のようなメモリの確保と開放を明示する必要はない。 JWZ が "Java sucks" で吐き捨てているのだが: 最初に、良い点: Javaには、 free() がない。 これ�
ocaml-tutorial.org/ガベージコレクション - 24 Nov 2006
これは、初めて OCaml プログラムを書いたときに コマンドラインから渡される引数の読み出し方に悩む 人たちのための短いチュートリアルだ。
ocaml-tutorial.org/コマンドライン引数 - 10 Dec 2006
Perlと同じく、OCamlはリストを言語組込みで提供している。OCamlのリストは、全ての要素が、同じ型をもっていなければならない。リストを書くには、こうする: [1; 2; 3] (注 セミコロンだ、コンマじゃない) []は空のリストだ。 リストには、 head (最初の要素) と tai
ocaml-tutorial.org/データ型とパターンマッチング - 26 Oct 2006
それでは、あなたが、自分のウェブサイト上である調査をすることになったとしよう。それで、あなたの読者に、名前と年齢を質問することになった。ただひとつの問題は、なんらかの理由で、年齢を教えてくれない読者がいるということで - かたくなに、この欄をうめるのはいやだというのだ。あわれなデータベース管理者はどうしたらいい?
ocaml-tutorial.org/ヌルポインタ、assert、警告 - 19 Dec 2006
これは標準ライブラリが提供するものだけを用いた、 OCaml の基本的なファイル操作のガイドだ。 興味のあるモジュールの公式ドキュメントはこちら: Pervasives , Printf . 標準ライブラリは、読み込んだファイルを直接文字列に入れたり、 直接文字列をファイルに保存したりするような存在し�
ocaml-tutorial.org/ファイル操作 - 15 Dec 2006
このページでは、単純な体裁の整え方から 関数型、命令型やオブジェクト指向それぞれでのスタイルの選択まで、 OCaml プログラムのよりエレガントな書き方のヒントを示そうと思う。 議論のコーナー (英語)もある。 Caml programming guidelines も見よ。 ( 邦訳版(draft) �
ocaml-tutorial.org/プログラミングのスタイル - 29 Nov 2006
OCaml プログラムに対して2種類のプロファイルのとりかたがある: バイトコードの場合、実行回数を取得する ネイティブコードの場合、本物のプロファイルを取得する
ocaml-tutorial.org/プロファイルの採取 - 08 Nov 2006
OCaml では、あらゆるコードがモジュールにくるまれている。 モジュール自身は別のモジュールのサブモジュールになれて、 ファイルシステムのディレクトリにとても良く似ている。 だが、こういうことはあまりしない。 プログラムを書くとき、 amodule.ml と bmodule.ml というふたつのファイ�
ocaml-tutorial.org/モジュール - 20 Feb 2007
(未完)
ocaml-tutorial.org/ラベル - 17 Dec 2006
到现在我们已经讲了很多了,但还没有真正涉及到 函数式编程 . 目前所讲的所有特性 - 丰富的数据类型(rich data types), 模式匹配(pattern matching), 类型推导(type inference), 嵌套函数(nested functions) - 可以想象它们都可以在一种”超级C“语�
ocaml-tutorial.org/函数式编程 - 08 Dec 2008
这是一个给初次编写OCaml程序且想知道命令行意义的人看的简略指南。
ocaml-tutorial.org/命令行参数 - 23 May 2007
OCaml的注释是用 (* 和 *) 括起,如: (* 这是一个单行的注释. *) (* 这是一个 * 多行 * 的注释. *) 这和C的注释( /* ... */ )很相似. 目前还没有象Perl中 # ... 或C99/C++/Java中 // ... 那样的单行注释方式。 使用 ##
ocaml-tutorial.org/基础 - 12 Aug 2008
このページの論議(英語) 訳注:本章は編集の都合と読みやすさの観点から、原文の中身を一部別パートに分割しています。
ocaml-tutorial.org/性能とプロファイル - 08 Nov 2006
和Perl一样,OCaml也将对列表的支持直接内建在语言中了。OCaml中一个列表的所有元素的类型必须一致。使用以下格式来写列表: [1; 2; 3] (注意是分号,不是逗号)。 [] 表示空列表。 一个列表有一个“ 头 ”(第一个元素)和一个“ 尾 ”(剩下的元素)。头是一个元素,而尾则�
ocaml-tutorial.org/数据类型和匹配 - 24 Nov 2007
这是一个在众多OCaml生成平台上使用的标准 文件名 和后缀名的参考.
ocaml-tutorial.org/文件名和后缀 - 23 May 2007
这是一篇讲解只用OCaml标准库中提供的操作来实现基本文件操作的指南。 This is a guide to basic file manipulation in OCaml using only what the standard library provides. 请看官方模块文档: Pervasive
ocaml-tutorial.org/文件操作 - 23 May 2007
标准库示例 哈希表 ( Hashtbl ) 集合 ( Set ) 映射表 ( Map ) 参见: Comparison of Standard Containers 以stack为例 编写如下一行代码即可看见Stack库中的函数定义。 module MyStack =
ocaml-tutorial.org/标准库示例 - 25 Apr 2008
これは、OCaml 言語あるいは OCaml 標準ライブラリで提供される、 異なるコンテナ型のラフな比較である。 それぞれのケースにおいて n はコンテナ内の有効な要素数である。 いくつかの操作については、 ビッグO(ランダウの記号) で現在の実装におけるコストを表示するが、 公式ドキュメントでは保証されていな�
ocaml-tutorial.org/標準コンテナの比較 - 17 Jan 2007
Hashtbl Set Map 標準コンテナの比較 も見よ。
ocaml-tutorial.org/標準ライブラリの例 - 12 Jan 2007
In OCaml, every piece of code is wrapped into a module. Optionally, a module itself can be a submodule of another module, pretty much like directories in a fi
ocaml-tutorial.org/模块 - 13 Jul 2007
那么现在假设你在网站上放了个调查,询问读者的姓名和年龄。有一个问题是,如果由于某些原因一些读者不想给出他们的年龄——他们很顽固,拒绝填写这一栏。那么可怜的数据库管理员要怎么做呢? 假设年龄是由一个 int 来表示的,有两种方式来解决这个问题。最常见的方式(也是最 错误 的)是当没有收集到年龄信息的时候,为年龄假�
ocaml-tutorial.org/空指针(null_pointers),断言(asserts)和警告(warnings) - 24 Nov 2007
本页的目的是教你怎么编写更优美的Ocaml程序, 包括从简单格式问题到函数式、命令式或面象对象式风格的选择。此页有一个 讨论角 . 另见: Caml 编程指导
ocaml-tutorial.org/编程风格 - 23 May 2007
OCamlはなぜ速いのか? まぁ、もう一歩引いて聞こうか。 OCaml は速いのか ? どうしたらプログラムを高速化できるのか? この章では、OCaml プログラムがコンパイルされて機械語に落ちる際、 実際に何が起こっているのかを見ていこうと思う。 ここから、OCaml が単に素晴らしいプログラミング言語というだけ�
ocaml-tutorial.org/速度 - 19 Nov 2006
チュートリアルも、かなり進んできたが、まだ 関数型プログラミング について深く考えたことがない。これまでに教えた機能をあまさず使うことを考えれば - 豊富なデータ型、パターンマッチング、型推論、入れ子関数 - これはもう、"超C言語"みたいに思えてくる。これらはたしかにクールな機能で、あなたのコ�
ocaml-tutorial.org/関数型プログラミング - 27 Oct 2006
OCaml 주석은 다음과 같이 (* 와 *) 사이에 들어간다. (* 이 주석은 한 줄 주석입니다. *) (* 이 주석은 * 여러 줄 * 주석입니다. *) 바꿔 말해서, 주석 표기법은 기존 C 언어의 ( /* ... */ )와 매우 유사하다. 현재 (Per
ocaml-tutorial.org/기본기 - 15 Mar 2007
여러분은 여러분의 웹사이트에서 독자들의 이름과 연령을 묻는 조사를 한다고 하자. 유일한 문제는 몇몇 이유로 인해 일부 독자가 그들의 나이를 공개하기를 꺼려한다는 점이다. 그들은 나이 필드 기입을 고집스럽게 거부하고 있다. 불쌍한 데이터베이스 관리자는 무엇을 할 수 있을까? - 현�
ocaml-tutorial.org/널_포인터,_어설트(assert),_경고(warning) - 29 Jan 2007
펄(Perl)과 마찬가지로 Ocaml도 리스트를 언어 차원에서 지원한다. OCaml에서 리스트의 구성 요소는 모두 같은 타입이어야 한다. 리스트는 다음과 같이 쓴다. [1; 2; 3] (콤마가 아닌 세미콜론임을 명심하자.) [] 는 빈 리스트를 의미한다.
ocaml-tutorial.org/데이타_타입과_매칭 - 29 Jan 2007
OCaml에서 모든 코드는 모듈 내에 들어 있다. 또한 자주 사용되지 않지만 파일 시스템의 디렉토리와 비슷하게, 모듈 자체가 다른 모듈의 서브 모듈이 될 수 있다. amodule.ml 과 bmodule.ml 두 파일을 사용해 프로그램을 작성한다고 하면, 각 파일의 이름에 따�
ocaml-tutorial.org/모듈 - 11 Sep 2008
documents * 박성우, 포항공대 전자계산입문 강의자료, http://www.postech.ac.kr/~gla/cs101/notes/all.pdf, 2008. *
ocaml-tutorial.org/자원 - 11 Sep 2008
이 튜토리얼이 꽤 진행되었지만 아직도 함수형 프로그래밍을 진짜로 고려해보지 않았다. 지금 까지 살펴본 기능들-풍부한 자료형, 패턴 매칭, 타입 추론, 중첩 함수-은 "슈퍼 C" 언어에도 있을지도 모를 그런 기능들이다. 물론 멋진 기능들이며, 코드를 간략하고, 읽기 �
ocaml-tutorial.org/함수형_프로그래밍 - 10 Sep 2008