Read from stdin
This commit is contained in:
@@ -2,5 +2,12 @@ import system.io
|
|||||||
|
|
||||||
open io
|
open io
|
||||||
|
|
||||||
def main: io unit :=
|
def greet (s : string) : io unit :=
|
||||||
put_str "Gamarjoba, munde!"
|
put_str $ "Hello, " ++ s ++ "!\n"
|
||||||
|
|
||||||
|
def main: io unit := do
|
||||||
|
put_str "Gamarjoba, munde!\n",
|
||||||
|
put_str "Onamae wa? ",
|
||||||
|
name <- get_line,
|
||||||
|
greet name
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user