Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- defmodule Xdd do
- def reverse_without_duplicates(list) do
- list
- |> Enum.reverse()
- |> Enum.uniq()
- end
- end
- example_list = [2, 3, 3, 1, 10]
- IO.puts Xdd.reverse_without_duplicates(example_list)
Add Comment
Please, Sign In to add comment