EpilogJS
What
versus
How
 

ruleindex


ruleindex(expression,sentence,ruleset) → sentence

The subroutine ruleindex takes an expression, a sentence, and a ruleset as arguments and indexes the specified sentence on the primary operator of the specified expression. It returns the specified sentence as value.

Call: library = [] Exit: [] Call: ruleindex(["p","a","b"],library)) Exit: ["p","a","b"] Call: library.p Exit: [["p","a","b"]] Call: library.a Exit: [] Call: library.b Exit: [] Call: ruleindex([rule,["r","X","Y"],["p","X","Y"]],library)) Exit: ["p","a","b"] Call: library.r Exit: [[rule,["r","X","Y"],["p","X","Y"]]] Call: library.p Exit: []



Comments and complaints to genesereth@stanford.edu.