blob: 610fc4919e64411c102a375cf73d2842adcf15d3 (
plain) (
tree)
|
|
-module(bar).
-vsn(1).
-export([simple/1, complicated_sum/1]).
simple(X) ->
case lists2:assoc(simple, X) of
{ok, Val} -> Val;
false -> false
end.
complicated_sum([X, Y, Z]) -> cs(X, Y, Z).
cs([HX | TX], [HY | TY], [HZ | TZ]) ->
NewRes = cs(TX, TY, TZ),
[HX + HY + HZ | NewRes];
cs([], [], []) -> [].
|