a small library to make it easier to build a console application
it makes it possible to read from the console whilst writing to it
how it works
- when your code calls readline, it starts a loop, for each itteration it asks the console to wait for the user to input a key.
- when the user presses a key, the code checks if it's the key
returnif it is, it should return the current input.
- if your code calls write or writeline whilst a readline is being run, it does the following:
- clear the current line
- move the cursor to the start of the current line
- print the value to be printed
- move the cursor down a line
- print the current input (the text you had already wrote to the console before the write call)