Talk:Flatten a list

From Rosetta Code

Common Lisp and Empty Lists?

The comment after the CL example seems to imply that it would not work with the example list given, which includes nested lists that contain an empty list. It would therefore not satisfy the task? --Paddy3118 00:50, 17 August 2009 (UTC)

It works with the example given. The point is that if your list-of-lists-of-...-of-lists has as one of the intended leaf values a list, you won't get the proper answer. This is true of any flattener, unless you mark the leaves as not-part-of-the-tree somehow. --Kevin Reid 02:32, 17 August 2009 (UTC)

OCaml and Empty lists?

I am curious about the Ocaml entry and its problem with empty lists. Is their not some way of telling the type system to expect one of two types? --Paddy3118 00:58, 17 August 2009 (UTC)