write(a := read())
where write will not be executed if read fails, nor will a have any value assigned to it. Failure is an option and not an error.
So to copy standard input to standard output, we do
every write(read())
At the end of file, the read fails, the write fails and then the every fails and on you go.
write(a := read())
where write will not be executed if read fails, nor will a have any value assigned to it. Failure is an option and not an error.
So to copy standard input to standard output, we do
every write(read())
At the end of file, the read fails, the write fails and then the every fails and on you go.