Hi,

I have started to learn Erlang programming language but now i am trying to write program in functional manner and it is my first program in a functional approach (in whole my life). This program calculate sum of a list items.


-module(saeed).
-export([total/1]).

total([]) -> 0;
total([Item|Tail]) -> Item + total(Tail).


have a nice time.