Flattening lists

What can be said about the codes A and B given below?

A:

[1, [2], 3]

|> List.flatten()

B:

[1, [2], 3]

v() |> List.flatten()

Options
  1. Both A and B are equivalent.
  2. Both A and B are not equivalent.
  3. A will run without error but B will throw errors.
  4. B will run without error but A will throw errors.

Related Posts