85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
;; v ; => 9
;; (+= v 3 4)
;; v ; => 16
;; (+= v)
;; v ; => 16
;;
;; (define-macro (s:if-param varname . dat)
;; (match dat
;; (() '())
;; ((a) `(if (s:get ,varname) ,a '()))
;; ((a b) `(if (s:get ,varname) ,a ,b))))
;;
;; (define-macro (s:if-sessionvar varname . dat)
;; (match dat
|
>
>
>
>
>
>
>
>
>
|
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
;; v ; => 9
;; (+= v 3 4)
;; v ; => 16
;; (+= v)
;; v ; => 16
;;
(define-simple-syntax (s:if-param varname first ...)
(if (s:get varname)
first
...))
(define-simple-syntax (s:if-sessionvar varname first ...)
(if (s:session-var-get varname)
first
...))
;; (define-macro (s:if-param varname ...)
;; (match dat
;; (() '())
;; ((a) `(if (s:get ,varname) ,a '()))
;; ((a b) `(if (s:get ,varname) ,a ,b))))
;;
;; (define-macro (s:if-sessionvar varname . dat)
;; (match dat
|