Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 6.6.6) Copyright (c) 1990-2013 University of Amsterdam, VU Amsterdam SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details. For help, use ?- help(Topic). or ?- apropos(Word). Answers = [[a+b]/[a*c, 1+2/3, [1, 2, 3]], [a+b, a*c]/[1+2/3, [1, 2, 3]], [a+b, a*c, 1+2/3]/[[1, 2, 3]]]. % halt