Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSLoburev committed Jan 3, 2024
1 parent d9c55dc commit 3ee1bda
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build/reverse_polish_notation_evaluator.beam
build/stack.beam
erl_crash.dump
reverse_polish_notation_evaluator.beam
stack.beam
reverse_polish_notation_evaluator.beam
Binary file removed reverse_polish_notation_evaluator.beam
Binary file not shown.
1 change: 1 addition & 0 deletions reverse_polish_notation_evaluator/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ _build
*.iml
rebar3.crashdump
*~
/workspaces/parsers_in_erlang/build
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
-module(reverse_polish_notation_evaluator).
-export([start/0]).


% evaluate_rpn(expression) ->


start() ->
io:fwrite("Hello, world!~n").
io:fwrite("Hello, world!~n"),
Stack = stack:new(),
stack:push(3, stack:push(2, stack:push(1, Stack))),
io:fwrite("~p~n", stack:peek(Stack)),
io:fwrite("~p~n", stack:pop(Stack)),
io:fwrite("~p~n", stack:peek(Stack)),
io:fwrite("~p~n", stack:pop(Stack)),
io:fwrite("~p~n", stack:peek(Stack)),
io:fwrite("~p~n", stack:pop(Stack)),
io:fwrite("~p~n", stack:peek(Stack)),
io:fwrite("~p~n", stack:is_empty(Stack)).

0 comments on commit 3ee1bda

Please sign in to comment.