\documentclass[a4paper,10pt]{article}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
\usepackage{courier}
\usepackage{xcolor}
\usepackage{palatino}
\usepackage{alltt}
\usepackage{longtable}
\usepackage{amsfonts}
\definecolor{Blue}{rgb}{0.55, 0.55, 1.0} 
\definecolor{Red}{rgb}{0.95, 0.1, 0.1} 
\definecolor{Yellow}{rgb}{1.0, 0.52, 0.0}
\definecolor{Green}{rgb}{0.25, 0.70, 0.30}

\author{BODIN~Antoine}
\title{Ocaml Algorithm}
\date{\today}


\begin{document}
\maketitle
\tableofcontents


\section{Fibonacci}



fibonacci algorithm : \\\\
\ocaml{algorithme de fibonacci naïf récursif}{
let rec f = 
  function  
    x when x<=1 -> x 
  | x -> f (x-1) + f (x-2) 
}\\

\section{Factoriel}


factoriel : \\\\
\ocaml{fonction factorielle}{
let rec f = 
  function  
    1 -> 1 
  | x -> x * f (x-1) 
}

\begin{center}© copyright 2008 - all rights reserved ...\end{center}

\end{document}

