From 09e2ca3c7abae98d97cbd8efedc45482e15c6169 Mon Sep 17 00:00:00 2001 From: grue Date: Fri, 10 Feb 2006 10:00:54 +0000 Subject: [PATCH 1/1] add function "child" that returns the first child of an object darcs-hash:549f16b097c58f4103c59bb19c0b35a2bdf43461 --- if.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/if.lisp b/if.lisp index 6a0a3c2..881c629 100644 --- a/if.lisp +++ b/if.lisp @@ -40,7 +40,7 @@ :read-property :rp :read-property- :exec :exec* :abstractobject :name :names :parent :children :flags - :initflags :add-flags :has :hasnt :-> :give + :initflags :add-flags :has :hasnt :-> :give :child :ifclass :object :defaction :*meta* :move :rmv :ofclass :among :verb :extend-verb :extend-verb-first @@ -369,6 +369,10 @@ word in dictionary, add it." (not (intersection flags (flags obj)))) ;(not (subsetp flags (flags obj)))) +(defun child (obj) + "Returns the first child of the object" + (car (children obj))) + (defmethod parser ((obj abstractobject) words) "Default parser. Really bad one." (when (zerop (length words)) (return-from parser 0)) -- 2.31.1