let implode l = match l with | [] -> "" | cs -> let r = create (List.length cs) in let pos = ref 0 in List.iter begin fun c -> unsafe_set r !pos c; incr pos end cs; r