3 ms·
Simplify this to 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
by oldandtired 9y ago
Simplify this to
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.