let rec zigzag xs ys = match xs with | [] -> ys | x :: xs' -> x :: zigzag ys xs' ;; List.fold_left (+) 0 (zigzag [1;3;5;7;9] [2;4;6;8;10])