|
|
|
|
|
by irjoe
2543 days ago
|
|
You're right, they're not really "early returns" but for me at least they are often in similar fashion to the "early exit" pattern in the article: def transform_data(raw_data) when length(raw_data) == 1, do: []
def transform_data(raw_data) do
# actual function code goes here
end
That said, I wouldn't want to see the above snippet in my team's codebase :) |
|