let rec rev_list ls rls =
match ls with
| [] → rls
|h::t → rev_list t rls@[h];;
let p = fun thing → Printf.printf "%i " thing;;
let rec choose’ etc’ things k =
match things with
| [] → k []
| x :: xs → choose’ etc’ xs (fun t ->k (etc’ x :: t))
let choose etc things = choose’ etc (rev_list things []) Fun.id;;
choose (fun thing → Printf.printf "%i " thing) [1;2] ;;
output is
1 2 - : unit list = [(); ()]
i just want 1 2. can someone help please.