19 lines
569 B
Text
19 lines
569 B
Text
(task=
|
|
( oracle
|
|
= (predicate="is made of green cheese")
|
|
(generateTruth=.str$(!arg " " !(its.predicate) "."))
|
|
(generateLie=.str$(!arg " " !(its.predicate) "!"))
|
|
)
|
|
& new$oracle:?SourceOfKnowledge
|
|
& put
|
|
$ "You may ask the Source of Eternal Wisdom ONE thing.
|
|
Enter \"Truth\" or \"Lie\" on the next line and press the <Enter> key.
|
|
"
|
|
& whl
|
|
' ( get':?trueorlie:~Truth:~Lie
|
|
& put$"Try again\n"
|
|
)
|
|
& put$(str$("You want a " !trueorlie ". About what?" \n))
|
|
& get'(,STR):?something
|
|
& (SourceOfKnowledge..str$(generate !trueorlie))$!something
|
|
);
|