Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kata solutions #2 #2

Open
domenicolino opened this issue Apr 8, 2016 · 2 comments
Open

kata solutions #2 #2

domenicolino opened this issue Apr 8, 2016 · 2 comments

Comments

@domenicolino
Copy link

I'd be also interesting to search for solutions without using any module.

defmodule Span do
def sort(list, whatever_function) do
whileright(list, whatever_function, [])
end

defp whileright([head | tail], whatever_function, good) do
case whatever_function.(head) do
true -> whileright(tail, whatever_function, good ++ [head])
false -> {good, [head] ++ tail}
end
end

defp whileright([], _, good) do
{good, []}
end

end

@OleMchls
Copy link
Member

see: #1 (comment)

@OleMchls
Copy link
Member

or make a issue, in the planning repo, seems people do not watch this repo and almost no ones gets notifications for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants