# \#tutorial

**URL:** https://discuss.ocaml.org/tag/tutorial/523.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Tutorial on GADTs](https://discuss.ocaml.org/t/tutorial-on-gadts/14040)

<div class="topic-metadata">

**Author:** [@raphael-proust](https://discuss.ocaml.org/u/raphael-proust)\
**Replies:** 35\
**Last updated:** [October 7, 2026, 8:13am UTC](https://discuss.ocaml.org/t/tutorial-on-gadts/14040 "2026-10-07T08:13:54Z")

</div>

I’ve written a three-part tutorial on GADTs. The first part shows the very basic. It is intended for anyone who already knows OCaml but hasn’t written a GADT before. The second part is a collection of different techniq…

---

## [\[BLOG\] Introduction to the Dune build system, by OCamlPro](https://discuss.ocaml.org/t/blog-introduction-to-the-dune-build-system-by-ocamlpro/17279)

<div class="topic-metadata">

**Author:** [@OCamlPro](https://discuss.ocaml.org/u/OCamlPro)\
**Replies:** 0\
**Last updated:** [September 17, 2025, 11:49am UTC](https://discuss.ocaml.org/t/blog-introduction-to-the-dune-build-system-by-ocamlpro/17279 "2025-09-17T11:49:40Z")

</div>

Greetings Cameleers, We’ve just released a new blog post: OCaml Onboarding: Introduction to the Dune build system This is a practical, compact guide for those starting their OCaml and Dune journey — or helping others d…

---

## [\[BLOG\] A no-maths guide to monads](https://discuss.ocaml.org/t/blog-a-no-maths-guide-to-monads/16712)

<div class="topic-metadata">

**Author:** [@raphael-proust](https://discuss.ocaml.org/u/raphael-proust)\
**Replies:** 7\
**Last updated:** [May 27, 2025, 12:51pm UTC](https://discuss.ocaml.org/t/blog-a-no-maths-guide-to-monads/16712 "2025-05-27T12:51:23Z")

</div>

Prompted by someone complaining online about Haskell documentation, I wrote a zero-maths guide to monads (in OCaml, but it applies somewhat more broadly, it’s just OCaml has nice binding opearators):

---

## [\[BLOG\] Opam 103: Bootstrapping a New OCaml Project with opam, by OCamlPro](https://discuss.ocaml.org/t/blog-opam-103-bootstrapping-a-new-ocaml-project-with-opam-by-ocamlpro/16686)

<div class="topic-metadata">

**Author:** [@OCamlPro](https://discuss.ocaml.org/u/OCamlPro)\
**Replies:** 0\
**Last updated:** [May 22, 2025, 9:21am UTC](https://discuss.ocaml.org/t/blog-opam-103-bootstrapping-a-new-ocaml-project-with-opam-by-ocamlpro/16686 "2025-05-22T09:21:30Z")

</div>

Greetings Cameleers, We’re back with a new installment in our opam deep-dives series! Opam 103: Bootstrapping a New OCaml Project with opam This time, we’re taking a step back to focus on a beginner-friendly guide to …

---

## [Invitation to a new Ocaml tutorial - Imperative, Logic, Javascript](https://discuss.ocaml.org/t/invitation-to-a-new-ocaml-tutorial-imperative-logic-javascript/15844)

<div class="topic-metadata">

**Author:** [@mostafatouny](https://discuss.ocaml.org/u/mostafatouny)\
**Replies:** 11\
**Last updated:** [December 30, 2024, 6:26pm UTC](https://discuss.ocaml.org/t/invitation-to-a-new-ocaml-tutorial-imperative-logic-javascript/15844 "2024-12-30T18:26:15Z")

</div>

Hello, Imperative. Think Python is a renowned resource for absolute programming beginners starting with Python. It got translated to Think Julia alongside other languages. Suggestion. Why don’t we develop our port? It…

---

## [Tutorials on Modules, Functors and Libraries](https://discuss.ocaml.org/t/tutorials-on-modules-functors-and-libraries/13968)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 11\
**Last updated:** [February 13, 2024, 10:33am UTC](https://discuss.ocaml.org/t/tutorials-on-modules-functors-and-libraries/13968 "2024-02-13T10:33:53Z")

</div>

Dear OCamlers, OCaml.org tutorial updates continue. We’ve just published the three tutorials on the module system announced in December: Modules — Based on the previous version Functors — Mostly rewritten Libraries wi…

---

## [How should \`dune\` be used in the newcomer tutorials?](https://discuss.ocaml.org/t/how-should-dune-be-used-in-the-newcomer-tutorials/14022)

<div class="topic-metadata">

**Author:** [@mobileink](https://discuss.ocaml.org/u/mobileink)\
**Replies:** 16\
**Last updated:** [February 7, 2024, 5:02pm UTC](https://discuss.ocaml.org/t/how-should-dune-be-used-in-the-newcomer-tutorials/14022 "2024-02-07T17:02:16Z")

</div>

Just one problem: dune. It’s one thing to recommend dune as a build system. No prob. It’s another thing entirely to teach newcomers that dune is OCaml. It is not. Emphatically not. It is in fact radically different. Th…

---

## [\[BLOG\] opam 101: the first steps, by OCamlPro](https://discuss.ocaml.org/t/blog-opam-101-the-first-steps-by-ocamlpro/13975)

<div class="topic-metadata">

**Author:** [@OCamlPro](https://discuss.ocaml.org/u/OCamlPro)\
**Replies:** 7\
**Last updated:** [February 2, 2024, 10:04am UTC](https://discuss.ocaml.org/t/blog-opam-101-the-first-steps-by-ocamlpro/13975 "2024-02-02T10:04:54Z")

</div>

Greetings Cameleers, Here’s a quick heads up about our latest blog post: opam 101: the first steps We believe this short tutorial could be useful to anybody who is looking into getting acquainted with our beloved packa…

---

## [\[ANN\] Bogue tutorials 0.1.0](https://discuss.ocaml.org/t/ann-bogue-tutorials-0-1-0/11816)

<div class="topic-metadata">

**Author:** [@sanette](https://discuss.ocaml.org/u/sanette)\
**Replies:** 8\
**Last updated:** [January 31, 2024, 12:42pm UTC](https://discuss.ocaml.org/t/ann-bogue-tutorials-0-1-0/11816 "2024-01-31T12:42:42Z")

</div>

Hi, I’m pleased to announce an ongoing series of tutorials for Bogue (the Desktop GUI library for OCaml): So far only three are written: Hello world A simple counter Self-modifying layouts More will come when time …

---

## [Draft tutorials on Modules, Functors and Libraries](https://discuss.ocaml.org/t/draft-tutorials-on-modules-functors-and-libraries/13686)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 10\
**Last updated:** [December 24, 2023, 6:28pm UTC](https://discuss.ocaml.org/t/draft-tutorials-on-modules-functors-and-libraries/13686 "2023-12-24T18:28:40Z")

</div>

Dear OCamlers, The series on ocaml.org tutorial updates continue. This time, the ocaml.org team has three drafts related to the module system in a single pull request. We want your feedback on it: GH PR: Update Modul…

---

## [Tutorial on Mutability, Loops, and Imperative Programming](https://discuss.ocaml.org/t/tutorial-on-mutability-loops-and-imperative-programming/13644)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 0\
**Last updated:** [December 15, 2023, 9:20am UTC](https://discuss.ocaml.org/t/tutorial-on-mutability-loops-and-imperative-programming/13644 "2023-12-15T09:20:04Z")

</div>

Dear OCamlers, The OCaml.org is happy to announce the release of the Mutability, Loops, and Imperative Programming tutorial which was discussed here a couple of weeks ago. We’ve included feedback from that thread. The…

---

## [New Draft Tutorial on Polymorphic Variants](https://discuss.ocaml.org/t/new-draft-tutorial-on-polymorphic-variants/13485)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 24\
**Last updated:** [November 30, 2023, 2:00pm UTC](https://discuss.ocaml.org/t/new-draft-tutorial-on-polymorphic-variants/13485 "2023-11-30T14:00:51Z")

</div>

Dear OCamlers, The OCaml.org team continues working on new tutorials. We have a draft on polymorphic variants; we’d like your feedback on it: GH PR: https://github.com/ocaml/ocaml.org/pull/1531 Online draft: Polymorph…

---

## [Draft Tutorial on Mutability, Loops, and Imperative Programming](https://discuss.ocaml.org/t/draft-tutorial-on-mutability-loops-and-imperative-programming/13504)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 4\
**Last updated:** [November 30, 2023, 9:05am UTC](https://discuss.ocaml.org/t/draft-tutorial-on-mutability-loops-and-imperative-programming/13504 "2023-11-30T09:05:36Z")

</div>

Dear OCamlers, The OCaml.org team has yet another draft tutorial. This time, the title is: “Mutability, Loops, and Imperative Programming”. We want your feedback on it: GH PR: Tutorial on Mutability and Imperative Pro…

---

## [Passing (the output of) one function straight into another](https://discuss.ocaml.org/t/passing-the-output-of-one-function-straight-into-another/13511)

<div class="topic-metadata">

**Author:** [@hmackiernan](https://discuss.ocaml.org/u/hmackiernan)\
**Replies:** 3\
**Last updated:** [November 27, 2023, 5:15pm UTC](https://discuss.ocaml.org/t/passing-the-output-of-one-function-straight-into-another/13511 "2023-11-27T17:15:28Z")

</div>

I am currently just starting out with OCaml and am working through this tutorial: Inside the utop REPL, We’ve defined a recursive function range that takes two int lo and hi and returns a list from lo to hi let rec …

---

## [New Tutorials on Basics of OCaml](https://discuss.ocaml.org/t/new-tutorials-on-basics-of-ocaml/13396)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 15\
**Last updated:** [November 17, 2023, 4:17pm UTC](https://discuss.ocaml.org/t/new-tutorials-on-basics-of-ocaml/13396 "2023-11-17T16:17:39Z")

</div>

Dear OCamlers The OCaml.org team is happy to announce the publication of two new tutorials: Values and Functions Basic Data Types and Pattern Matching These pages teach the basics of OCaml, starting from what is a va…

---

## [Ocaml.org tutorial revamping, con'd - Values and Functions](https://discuss.ocaml.org/t/ocaml-org-tutorial-revamping-cond-values-and-functions/13005)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 0\
**Last updated:** [September 12, 2023, 12:51pm UTC](https://discuss.ocaml.org/t/ocaml-org-tutorial-revamping-cond-values-and-functions/13005 "2023-09-12T12:51:36Z")

</div>

Here is a new episode in the series of updates of the ocaml.org tutorials https://github.com/ocaml/ocaml.org/pull/1512 https://staging.ocaml.org/docs/values-and-functions It addresses values, functions, environment, s…

---

## [Ocaml.org tutorial revamping, cont'd - Basic Datatypes](https://discuss.ocaml.org/t/ocaml-org-tutorial-revamping-contd-basic-datatypes/12985)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 3\
**Last updated:** [September 11, 2023, 1:56pm UTC](https://discuss.ocaml.org/t/ocaml-org-tutorial-revamping-contd-basic-datatypes/12985 "2023-09-11T13:56:32Z")

</div>

Update of the ocaml.org tutorials continues. We’d like to have your opinion on this new one: Staging: https://staging.ocaml.org/docs/basic-data-types GitHub PR: Create Basic Data Types Tutorial by cuihtlauac · Pull Re…

---

## [Unix.time ;; Unbound Module Error](https://discuss.ocaml.org/t/unix-time-unbound-module-error/12970)

<div class="topic-metadata">

**Author:** [@professor.rose](https://discuss.ocaml.org/u/professor.rose)\
**Replies:** 2\
**Last updated:** [September 6, 2023, 9:43am UTC](https://discuss.ocaml.org/t/unix-time-unbound-module-error/12970 "2023-09-06T09:43:56Z")

</div>

When I run Unix.time;; in UTop (macOS), I get this error: Error: Unbound module Unix Hint: Did you mean Unit? Does anyone know how to solve this? We couldn’t fine anything online, including Stack Overflow.

---

## [Doc Review: Updating S-Expressions Tutorial](https://discuss.ocaml.org/t/doc-review-updating-s-expressions-tutorial/12906)

<div class="topic-metadata">

**Author:** [@professor.rose](https://discuss.ocaml.org/u/professor.rose)\
**Replies:** 6\
**Last updated:** [September 2, 2023, 3:23pm UTC](https://discuss.ocaml.org/t/doc-review-updating-s-expressions-tutorial/12906 "2023-09-02T15:23:56Z")

</div>

We’ve been working on updating and improving the Learn documents on OCaml.org, and we would love your help and feedback in reviewing them. Did we miss anything? Does something need clarification? We’re also still ho…

---

## [Design Patterns for OCaml](https://discuss.ocaml.org/t/design-patterns-for-ocaml/12930)

<div class="topic-metadata">

**Author:** [@shubhamkumar13](https://discuss.ocaml.org/u/shubhamkumar13)\
**Replies:** 8\
**Last updated:** [September 1, 2023, 10:26pm UTC](https://discuss.ocaml.org/t/design-patterns-for-ocaml/12930 "2023-09-01T22:26:05Z")

</div>

I didn’t find many resources for writing idiomatic readable ocaml code. The only one resource that I have found is : https://people.csail.mit.edu/dnj/teaching/6898/projects/vicente-wagner.pdf But it talks about writing …

---

## [Creating a tutorial on sequences](https://discuss.ocaml.org/t/creating-a-tutorial-on-sequences/12091)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 1\
**Last updated:** [May 31, 2023, 6:30am UTC](https://discuss.ocaml.org/t/creating-a-tutorial-on-sequences/12091 "2023-05-31T06:30:14Z")

</div>

Hi all, Following up on ocaml.org tutorial updates, I’ve created one on sequences: Online (staging) tutorial: Sequences · OCaml Tutorials GitHub PR: https://github.com/ocaml/ocaml.org/pull/791 Again, feedback is hi…

---

## [Updating the “Error Handling” tutorial](https://discuss.ocaml.org/t/updating-the-error-handling-tutorial/12022)

<div class="topic-metadata">

**Author:** [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Replies:** 27\
**Last updated:** [May 19, 2023, 3:21pm UTC](https://discuss.ocaml.org/t/updating-the-error-handling-tutorial/12022 "2023-05-19T15:21:52Z")

</div>

Hi all I’m proposing to update the “Error Handling” tutorial from ocaml.org Current version: Error Handling · OCaml Tutorials Updated version: Error Handling · OCaml Tutorials Corresponding GitHub PR: https://github…

---

## [【Q】Tutorial for extended syntax?](https://discuss.ocaml.org/t/q-tutorial-for-extended-syntax/11724)

<div class="topic-metadata">

**Author:** [@anzhi0708](https://discuss.ocaml.org/u/anzhi0708)\
**Replies:** 3\
**Last updated:** [March 20, 2023, 12:41pm UTC](https://discuss.ocaml.org/t/q-tutorial-for-extended-syntax/11724 "2023-03-20T12:41:57Z")

</div>

Hello there! As an OCaml / FP noob, I recently discovered an OCaml web framework - you probably familiar with - Dream, and when I look into the example code, I found that they use a quite different syntax from native OC…

---

## [Tutorial: Full-Stack Web Dev in OCaml w/ Dream, Bonsai, and GraphQL](https://discuss.ocaml.org/t/tutorial-full-stack-web-dev-in-ocaml-w-dream-bonsai-and-graphql/9963)

<div class="topic-metadata">

**Author:** [@askvortsov](https://discuss.ocaml.org/u/askvortsov)\
**Replies:** 17\
**Last updated:** [June 14, 2022, 12:23am UTC](https://discuss.ocaml.org/t/tutorial-full-stack-web-dev-in-ocaml-w-dream-bonsai-and-graphql/9963 "2022-06-14T00:23:57Z")

</div>

Hi everyone! I’ve written a tutorial blog series about full-stack web development in OCaml, and wanted to share it here. Last semester, I took Penn State’s CMPSC 431W, where our final project was to build a database-dri…
