AtEndOfStream1
Implements ISO's at_end_of_stream/1: succeeds iff the input stream identified by the first argument (an alias or a $stream(...) term, see IOPrimitiveUtils.ensuringArgumentIsInputChannel) is closed or exhausted.
Throws
if the stream/alias does not identify an open channel.
(stream_type) if it identifies an output channel instead.