This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mix.install([ | |
{:benchee, "~> 1.3"} | |
]) | |
defmodule TailRecursive do | |
defstruct from: nil, to: nil | |
def identify([], _), do: [] | |
def identify([item], _), do: %__MODULE__{from: item, to: item} | |
def identify(v, is_next) when is_list(v) do |