I need a tail recursive function that appends a list1 infront of list2.
I tried it this way
let rec append lst1 lst2 acc = match lst1 with | [] -> acc @ lst2 | hd::tl -> append lst1 tl (hd::acc);;append [1;3;4] [3;4;2] [];;
But the result is "time out" every time