I want to sort so that odd numbers in a list appeart first and evens appear last, but i need evens to be the same position to how they were pre sort, is there a simple workaround to this?
let rec first_odd list = match list with| [] -> []| h::t when h mod 2==0 -> first_odd t@[h]| h::t -> h::first_odd t;;first_odd[3;1;7;3;4;5;4;3;6;-1;0;3];;first_odd[1;0;1;5;6;6;1;10;-8;4; -9];;