let array_map_all func arr = let lst = Array.to_list arr in (list_map_all func lst) >>= (fun res_lst -> return & (Array.of_list res_lst))