I want to be able to read numbers from console input, and store them into a list until the user types end, like this:
readN = readNumbers []
readNumbers nums = do
n <- readFloatOrString
case n of
<<number>> -> return readNumbers (nums ++ [n])
"end" -> return nums
Is this doable without importing a library?