procgen  Check-in [401c47f413]

Overview
Comment:shit
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 401c47f4133d6d3ac6a8dda01a0adbf3ba32ff7fef2a37287fdba71ac2266645
User & Date: lexi on 2020-02-04 11:27:22
Other Links: manifest | tags
Context
2020-10-15
08:07
updates check-in: c572c01910 user: lexi tags: trunk
2020-02-04
11:27
shit check-in: 401c47f413 user: lexi tags: trunk
2019-11-19
01:44
fix tpyos check-in: 23520bb165 user: lexi tags: trunk
Changes

Modified lib/bot.scm from [d5281d581a] to [51a318e9be].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
; create the case structure for rule expansion
(define-for-syntax (@rewrite-patterns patterns)
  (define (nest-case pair)
	(cons (list (car pair))
		  (cdr pair)))

  (define (wrap pat) 
	(if (eq? (cdr pat) '()) ;then
		pat
	; else
		(list (cons 'string-append pat))))

  (let ([branches (map wrap patterns)])
	(@one-of nest-case branches)))








|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
; create the case structure for rule expansion
(define-for-syntax (@rewrite-patterns patterns)
  (define (nest-case pair)
	(cons (list (car pair))
		  (cdr pair)))

  (define (wrap pat) 
	(if (null? (cdr pat)) ;then
		pat
	; else
		(list (cons 'string-append pat))))

  (let ([branches (map wrap patterns)])
	(@one-of nest-case branches)))