I’m using: SWI-Prolog version 9.0.4 for x86_64-linux
I want the code to: read lines of STDIN until EOF into a single list.
But what I’m getting is:
$ echo -e "hi\nthere" | swipl thing.pl
Welcome to SWI-Prolog (threaded, 64 bits, version 9.0.4)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
ERROR: Stream user_input:8:5 Syntax error: Unexpected end of file
I attempted using bagof/3 to collect all the possible values of S into a list but that didn’t work as well.