How can you read from standard input in Unison?

Viewed 21

How can you read Text from standard input in Unison?

1 Answers

You can read Text with io.console.getLine; from the doc example:

use Text ++
printLine "Important question: what's your favorite type of pie?"
printLine "> "
pie = !getLine
printLine (pie ++ "!? No way, me too!!! ")

And as you can see in the example, you can print a line of Text with io.console.printLine.

Related