Add solution for task: Flatten a list