fork download
  1. (* your code goes here *)
  2. let rec last = function
  3. | [] -> None
  4. | [x] -> Some x
  5. | _ :: t -> last t;;
  6.  
  7.  
  8.  
  9. let b = [1;2;3;4];;
  10.  
  11.  
  12. let _ Printf.printf "%d\n" (last b)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
File "prog.ml", line 12, characters 6-12:
Error: Syntax error
stdout
Standard output is empty