13515.mlw 267 Bytes
Newer Older
MARCHE Claude's avatar
MARCHE Claude committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(*

BTS 13515

https://gforge.inria.fr/tracker/index.php?func=detail&aid=13515&group_id=2990
*)

module ExcepAndRec

use import int.Int

exception E

let rec f (x:int) : int =
  if x = 42 then raise E else
  try
    let n = f (x-1) in
    n
  with E -> 42
  end

end