Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % hello world program
- -module(helloworld).
- -export([start/0]).
- start() ->
- io:fwrite("Hello, world!\n"),
- Str="a*b",
- L=lists:reverse(dodajNaListe(Str,string:len(Str))),
- io:fwrite("~p~n", [L])
- .
- dodajNaListe(Str,N) when N==0 -> [];
- dodajNaListe(Str,N) ->
- X=lists:sublist(Str, N, 1),
- L=[X|dodajNaListe(Str,N-1)].
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement