New to Elixir, I'm trying to write a simple game that will have a readFrom/1 function that reads inputs and plays the game accordingly, and then a print/1 function that will print that game.
Since they will be called through the iex one after the other, how can I make the print/1 function print the result from readFrom/1? In any other language I would just save the values I need in variables and just get them after with the print/1 function.
I have to do it this way due to requirements, and I can't find anything that will help me figure this out.
Thanks!