simple text menu in Haskell
- by snorlaks
Hello,
I would like to know what is the best solution to create simple menu with functionality described below (pseudo code) just like im used to:
while (true){
x = readLine();
case (x):
x == "1" then do sth1 function
x == "2" then do sth2 function
}
thanks for help, maybe any other ideas on how to make menu not in pattern described above?