Differences From Artifact [d5281d581a]:
- File lib/bot.scm — part of check-in [294d779091] at 2019-04-17 23:45:48 on branch trunk — tidy up headers (user: lexi, size: 2137) [annotate] [blame] [check-ins using]
To Artifact [51a318e9be]:
- File lib/bot.scm — part of check-in [401c47f413] at 2020-02-04 11:27:22 on branch trunk — shit (user: lexi, size: 2135) [annotate] [blame] [check-ins using]
26 26 ; create the case structure for rule expansion 27 27 (define-for-syntax (@rewrite-patterns patterns) 28 28 (define (nest-case pair) 29 29 (cons (list (car pair)) 30 30 (cdr pair))) 31 31 32 32 (define (wrap pat) 33 - (if (eq? (cdr pat) '()) ;then 33 + (if (null? (cdr pat)) ;then 34 34 pat 35 35 ; else 36 36 (list (cons 'string-append pat)))) 37 37 38 38 (let ([branches (map wrap patterns)]) 39 39 (@one-of nest-case branches))) 40 40