let
rec
last list =
match
list
with
|
[x]
->
Some
x
|
_ :: tl
->
last tl
|
[]
->
None