README.md | enso.nim: attempt added for safer Exception handling, README updated to reflect current state and philosophy
This commit is contained in:
@ -43,8 +43,8 @@ func main() =
|
||||
else:
|
||||
run strput("flat had no data")
|
||||
|
||||
let writer: Error = run filewrite("Hello world!\n", "test.txt")
|
||||
if writer == OK:
|
||||
let writer: IO[Option[Unit]] = filewrite("Hello world!\n", "test.txt")
|
||||
if writer().isSome:
|
||||
run strput("Successfully wrote test.txt!")
|
||||
else:
|
||||
run strput("Could not write test.txt!")
|
||||
|
||||
Reference in New Issue
Block a user