diff base/methods.lisp @ 121:4198b52e612b

More docstrings darcs-hash:20070727142154-f76cc-f59d4ad1216346f392d5b9f9e5b153a6f07a9bd9.gz
author David Lewis <d.lewis@gold.ac.uk>
date Fri, 27 Jul 2007 15:21:54 +0100
parents d574d015f5af
children efaa02d21690
line wrap: on
line diff
--- a/base/methods.lisp	Fri Jul 27 12:25:07 2007 +0100
+++ b/base/methods.lisp	Fri Jul 27 15:21:54 2007 +0100
@@ -174,41 +174,47 @@
 ;; Time protocol
 
 (defmethod time+ ((object1 moment) (object2 period))
-  "(time+ <moment> <period>) -> <moment> Implemented as a
-straightforward summation."
+  "Returns a <moment>. Implemented as a straightforward
+summation."
   (make-moment (+ (timepoint object1) (duration object2))))
 
 (defmethod time+ ((object1 period) (object2 moment)) ;?
-  "(time+ <period> <moment>) -> <moment> Implemented as a
-straightforward summation and defined by default as (time+
-<moment> <period>)."
+  "Returns a <moment>. Implemented as a straightforward summation
+and defined by default as (time+ <moment> <period>)."
   (time+ object2 object1))
 
 (defmethod time+ ((object1 period) (object2 period))
-  "(time+ <period> <period>) -> <period> Implemented as a
-straightforward summation."
+  "Returns a <period>. Implemented as a straightforward
+summation."
   (make-floating-period (+ (duration object1)
 			   (duration object2))))
 
 (defmethod time+ ((object1 moment) (object2 moment))
-  "(time+ <moment> <moment>) -> <condition:undefined-action> The
-question makes no sense."
+  "Returns <condition:undefined-action>. The question makes no
+sense."
   (error 'undefined-action :operation 'time+ :datatype (list (class-of object1) (class-of object2))))
 
 (defmethod time- ((object1 moment) (object2 moment))
+  "Returns <anchored-period> with an onset at object2 and
+  extending to object1"
   (make-anchored-period (timepoint object2)
 			(- (timepoint object1)
 			   (timepoint object2))))
 
 (defmethod time- ((object1 moment) (object2 period))
+  "Simple subtraction - Returns a <moment>"
   (make-moment (- (timepoint object1) (duration object2))))
 
 (defmethod time- ((object1 period) (object2 moment)) ;?
+  "Returns <condition:undefined-action>. The question makes no
+sense"
   (error 'undefined-action
 	 :operation 'time-
 	 :datatype (list (class-of object1) (class-of object2))))
 
 (defmethod time- ((object1 period) (object2 period))
+  "Returns <floating-period> spanning the difference of the
+periods"
   (make-floating-period (- (duration object2)
 			   (duration object1))))