m@1
|
1 ;; Some methods that can be defined in terms of others:
|
m@1
|
2
|
m@1
|
3 ;; Time
|
m@1
|
4
|
m@1
|
5 (defmethod time>= ((object1 moment) (object2 moment))
|
m@1
|
6 (or (time> object1 object2)
|
m@1
|
7 (time= object1 object2)))
|
m@1
|
8
|
m@1
|
9 (defmethod time<= ((object1 moment) (object2 moment))
|
m@1
|
10 (or (time< object1 object2)
|
m@1
|
11 (time= object1 object2)))
|
m@1
|
12
|
m@1
|
13 (defmethod time/= ((object1 moment) (object2 moment))
|
m@1
|
14 (not (time= object1 object2)))
|
m@1
|
15
|
m@1
|
16 ;; Duration
|
m@1
|
17
|
m@1
|
18 (defmethod duration>= ((object1 duration) (object2 duration))
|
m@1
|
19 (or (duration> object1 object2)
|
m@1
|
20 (duration= object1 object2)))
|
m@1
|
21
|
m@1
|
22 (defmethod duration<= ((object1 duration) (object2 duration))
|
m@1
|
23 (or (duration< object1 object2)
|
m@1
|
24 (duration= object1 object2)))
|
m@1
|
25
|
m@1
|
26 (defmethod duration/= ((object1 duration) (object2 duration))
|
m@1
|
27 (not (duration= object1 object2)))
|
m@1
|
28
|
m@1
|
29 ;; Pitch
|
m@1
|
30
|
m@1
|
31 (defmethod pitch>= ((object1 pitch) (object2 pitch))
|
m@1
|
32 (or (pitch> object1 object2)
|
m@1
|
33 (pitch= object1 object2)))
|
m@1
|
34
|
m@1
|
35 (defmethod pitch<= ((object1 pitch) (object2 pitch))
|
m@1
|
36 (or (pitch< object1 object2)
|
m@1
|
37 (pitch= object1 object2)))
|
m@1
|
38
|
m@1
|
39 (defmethod pitch/= ((object1 pitch) (object2 pitch))
|
m@1
|
40 (not (pitch= object1 object2)))
|
m@1
|
41
|
m@1
|
42 ;; Interval
|
m@1
|
43
|
m@1
|
44 (defmethod interval>= ((object1 interval) (object2 interval))
|
m@1
|
45 (or (interval> object1 object2)
|
m@1
|
46 (interval= object1 object2)))
|
m@1
|
47
|
m@1
|
48 (defmethod interval<= ((object1 interval) (object2 interval))
|
m@1
|
49 (or (interval< object1 object2)
|
m@1
|
50 (interval= object1 object2)))
|
m@1
|
51
|
m@1
|
52 (defmethod interval/= ((object1 interval) (object2 interval))
|
m@1
|
53 (not (interval= object1 object2)))
|