I would like to make a function that accepts a list and returns two lists: the first contains every odd item, and the second contains every even item.
For example, g
If you mean odd and even values for positions of items, here is a (non-tail-recursive) solution:
let rec splitList = function | [] -> [], [] | [x]-> [x], [] | x1::x2::xs -> let xs1, xs2 = splitList xs x1::xs1, x2::xs2