fork download
  1. (* your code goes here *)
  2.  
  3.  
  4. let permute i j lst =
  5. let ar = Array.of_list (lst) in
  6. let tmp = ar.(i) in
  7. ar.(i) <- ar.(j)
  8. ar.(j) <- tmp
  9. Array.to_list(ar)
  10.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
File "prog.ml", line 8, characters 10-12:
Error: Syntax error: ')' expected
File "prog.ml", line 7, characters 6-7:
Error: This '(' might be unmatched
stdout
Standard output is empty