Re: Generalised approach to storing address details
From: Neo <neo55592_at_hotmail.com>
Date: 13 Dec 2006 21:32:22 -0800
Message-ID: <1166074342.732996.134410_at_16g2000cwy.googlegroups.com>
Date: 13 Dec 2006 21:32:22 -0800
Message-ID: <1166074342.732996.134410_at_16g2000cwy.googlegroups.com>
> "Digraph" here is an abbreviation for "directed graph". That is, > a graph in which the edges' two nodes are labeled "from" and > "to."
Ok thanks. Below is a directed graph in dbd where Moe hits Larry who kicks Curly who slaps Moe. A query find the person who hits a person who kicks a person who slaps a person.
(new 'moe 'person)
(new 'larry 'person)
(new 'curly 'person)
(new 'hit 'verb)
(new 'kick 'verb)
(new 'slap 'verb)
(set moe hit larry)
(set larry kick curly)
(set curly slap moe)
(; Get who hit a person who kick a person who slap a person)
(; Gets moe!)
(get * hit (get * kick (get * slap (get person instance *))))
Received on Thu Dec 14 2006 - 06:32:22 CET
