(* your code goes here *)
let rec last = function
| [] -> None
| [x] -> Some x
| _ :: t -> last t;;
let b = [1;2;3;4];;
let _
Printf.printf
"%d\n" (last b
)
KCogeW91ciBjb2RlIGdvZXMgaGVyZSAqKQpsZXQgcmVjIGxhc3QgICA9IGZ1bmN0aW9uIAogICB8IFtdIC0+IE5vbmUKICAgfCBbeF0gLT4gU29tZSB4CiAgIHwgXyA6OiB0IC0+IGxhc3QgdDs7CgoKCmxldCBiID0gWzE7MjszOzRdOzsKCgpsZXQgXyBQcmludGYucHJpbnRmICIlZFxuIiAgKGxhc3QgYik=