Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Awww

-module(helloworld).
-export([start/0]).

start() ->
    Sum1 = sum("accentor", "systemic"),
    io:fwrite("~p~n", [Sum1]).
    
sum(L1, L2) ->
    Zipped = lists:zip(L1, L2),
    Mapped = lists:map(
        fun ({A, B}) ->
            if
                B - A > 0 -> B - A - 1;
                true -> B - A + 1
            end
        end, Zipped),
    lists:sum(Mapped).

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.