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