why do we need the zero? Why is it of type int e.g.

```
let list_mult list =
try list_mult_aux list
(* with Zero -> Zero ;; *)
with Zero -> 0;;
```

why do we need the zero? Why is it of type int e.g.

```
let list_mult list =
try list_mult_aux list
(* with Zero -> Zero ;; *)
with Zero -> 0;;
```

Because your â€świthâ€ť branch must have the same type of the â€śtriedâ€ť expression. Here, I suppose that list_mult_aux returns an integer?

1 Like

Yes:

```
let rec list_mult_aux list =
match list with
| [] -> 1
| x::xs -> if x=0 then
raise Zero
else
x * list_mult_aux xs;;
```

but Im still confusedâ€¦

Consider what the type of `list_mult`

is. It can only have one type.