Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -module(compte).
- -compile(export_all).
- compte(_,[]) ->
- 0;
- compte(X, [X | Tail]) ->
- compte(X, Tail) + 1;
- compte(X, [_ | Tail]) ->
- compte(X, Tail).
- main() ->
- compte(1, [1,2,3,1,1]).
- % Excercice 1 - a
- % A executer
- % compte:main().
- %
- % resultat : 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement