moxie - jlombar1 - prolog > pl Welcome to SWI-Prolog (Version 2.7.16) Copyright (c) 1993-1996 University of Amsterdam. All rights reserved. For help, use ?- help(Topic). or ?- apropos(Word). 1 ?- consult('colorsV2.pro'). colorsV2.pro compiled, 0.00 sec, 2,968 bytes. Yes 2 ?- listing | ^C Action (h for help) ? abort Execution Aborted 2 ?- listing. color(A) :- primary(A). color(A) :- secondary(A). color(A) :- other(A). other(aqua). other(mauve). other(magenta). other(pink). other(gray). other(coral). other(crimson). other(beige). other(chartreuse). other(fuchsia). other(gold). other(olivedrab). secondary(orange). secondary(purple). secondary(green). primary(red). primary(blue). primary(yellow). '$user_query'(2, []) :- listing. mix(blue, red, purple). mix(red, yellow, orange). mix(blue, yellow, green). mix(A, B, C) :- mix(B, A, C). Yes 3 ?- other(magenta). Yes 4 ?- other(majenta). No 5 ?- other(teal). No 6 ?- other(X),write(X),nl,fail. aqua mauve magenta pink gray coral crimson beige chartreuse fuchsia gold olivedrab No 7 ?- color(blue). Yes 8 ?- color(orange). Yes 9 ?- color(magenta). Yes 10 ?- color(C),write(C),nl,fail. red blue yellow orange purple green aqua mauve magenta pink gray coral crimson beige chartreuse fuchsia gold olivedrab No 11 ?- mix(blue,red,Secondary). Secondary = purple ; Secondary = purple Yes 12 ?- mix(red,blue,Secondary). Secondary = purple Yes 13 ?- halt.