Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

mimoo/ocamlbyexample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ocaml By Example

THIS REPO WAS MOVED TO https://github.com/o1-labs/ocamlbyexample

Learn the OCaml language, following a series of examples!

You can visit the rendered course here: https://mimoo.github.io/ocamlbyexample/.

This page is inspired by https://www.gobyexample.com.

Adding your own examples (chapters)

Create a folder in book/chapters/ (using another example), then add your chapter in book/chapters.json.

Some guidelines:

  1. short examples are best
  2. one chapter teaches one concept well
  3. one block of explanation teaches one subconcept well
  4. a concept is always introduced and explained the first time it is being used in an example

How to render the webpage locally

You need the OCaml language setup. Once you've set up OCaml you can install the dependencies needed by the project with:

make deps

Then simply run:

make

or to automatically update the website as you change files:

make watch

Can I use this for another programming language?

Yes, while the code is written in OCaml you can use it to build similar webpages for any programming language (although syntax highlighting will only work for languages supported by highlight.js).

So feel free to fork this page and use to teach your own stuff!