We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Update List
Update List
+ 0 comments A great list is the biggest driver of lead generation success. VSA offers a list building service that perfectly fits the needs of complex.
+ 0 comments Haskell short
f = map abs
+ 0 comments Erlang Solution. There is a built in abs(X) function, but I rolled my own just for the practice.
-module(solution). -export([main/0]). read(NewList) -> case io:fread("", "~d") of {ok, [NewElement]} -> read(NewList ++ [NewElement]); _ -> NewList end. absValue(X) when X >= 0 -> X; absValue(X) when X < 0 -> X * -1; absValue(_) -> ok. main() -> List = read([]), AbsList = [absValue(N) || N <- List], [io:format("~p~n", [A]) || A <- AbsList].
+ 0 comments Elixir solution https://gist.github.com/uxjp/5f6753d684aa1a48b8670726ff1a73dc
Load more conversations
Sort 88 Discussions, By:
Please Login in order to post a comment