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