Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. % hello world program
  2. -module(helloworld).
  3. -export([start/0]).
  4.  
  5. start() ->
  6. io:fwrite("Hello, world!\n"),
  7. Str="a*b",
  8. L=lists:reverse(dodajNaListe(Str,string:len(Str))),
  9. io:fwrite("~p~n", [L])
  10. .
  11.  
  12. dodajNaListe(Str,N) when N==0 -> [];
  13. dodajNaListe(Str,N) ->
  14. X=lists:sublist(Str, N, 1),
  15. L=[X|dodajNaListe(Str,N-1)].
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement