+
+ defp format_suggestions({:list_behaviour_implementations, behaviour}) do
+ behaviour
+ |> list_behaviour_implementations()
+ |> format_suggestions()
+ end
+
+ defp format_suggestions([]), do: []
+
+ defp format_suggestions([suggestion | tail]) do
+ [format_suggestion(suggestion) | format_suggestions(tail)]
+ end
+
+ defp format_suggestion(entity) when is_atom(entity) do
+ atom_to_string(entity)
+ end
+
+ defp format_suggestion([head | tail] = entity) when is_list(entity) do
+ [format_suggestion(head) | format_suggestions(tail)]
+ end
+
+ defp format_suggestion(entity) when is_tuple(entity) do
+ format_suggestions(Tuple.to_list(entity)) |> List.to_tuple()
+ end
+
+ defp format_suggestion(entity), do: entity