Monthly Archives: October 2020

Running SWI-Prolog as a unix filter

This is how to run SWI-Prolog as a unix filter Here’s a Prolog program that reads a number from a line and prints ‘twice that is 8’. double :-  read_line_to_codes(current_input, X), number_codes(N, X), Result is 2 * N, format(‘twice that … Continue reading

Posted in Uncategorized | Leave a comment