File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 255
255
(token- splice- rest body tokens)))
256
256
(return true ))
257
257
258
+ ;; [start, end] where start >= end
259
+ (defmacro each- in - closed- interval- descending (start- max any end- min any
260
+ iterator- name symbol
261
+ & rest body any)
262
+ (tokenize- push output
263
+ (c- for (var (token- splice iterator- name) int (token- splice start- max))
264
+ (>= (token- splice iterator- name) (token- splice end- min))
265
+ (decr (token- splice iterator- name))
266
+ (token- splice- rest body tokens)))
267
+ (return true ))
268
+
258
269
(defmacro each- char- in - string (start- char any iterator- name symbol & rest body any)
259
270
(tokenize- push output
260
271
(c- for (var (token- splice iterator- name) (* char) (token- splice start- char))
Original file line number Diff line number Diff line change 25
25
; ; Macros
26
26
(put 'each-in-range 'lisp-indent-function 2 )
27
27
(put 'each-in-interval 'lisp-indent-function 3 )
28
+ (put 'each-in-closed-interval-descending 'lisp-indent-function 3 )
28
29
(put 'each-in-array 'lisp-indent-function 2 )
29
30
(put 'each-char-in-string 'lisp-indent-function 2 )
30
31
(put 'each-char-in-string-const 'lisp-indent-function 2 )
You can’t perform that action at this time.
0 commit comments