fork(1) download
  1. let l = [1;2;3;4;5];;
  2.  
  3.  
  4. let rec mem list element = match list with
  5. | [] -> false
  6. | head::tail -> if head=element then true else mem tail element
  7. in
  8. Printf.printf "%B \n" (mem l 3) ;;
Success #stdin #stdout 0s 4240KB
stdin
Standard input is empty
stdout
true