Read from stdin

This commit is contained in:
Greg Shuflin 2022-05-30 17:40:22 -07:00
parent ed91280a4d
commit 7912636be6

View File

@ -2,5 +2,12 @@ import system.io
open io
def main: io unit :=
put_str "Gamarjoba, munde!"
def greet (s : string) : io unit :=
put_str $ "Hello, " ++ s ++ "!\n"
def main: io unit := do
put_str "Gamarjoba, munde!\n",
put_str "Onamae wa? ",
name <- get_line,
greet name