Welcome to the CHICKEN Scheme pasting service

html generator fixed added by sugarwren on Sat Oct 26 18:24:36 2019

(define-syntax generate-html-tag
  (syntax-rules ()
    ((generate-html-tag x)
     (define (x . args)
       (delay 
         (begin
           (display (string-append "<" (symbol->string 'x) ">"))
           (for-each
            (lambda (arg)
              (cond
               ((string? arg) (display arg))
               ((promise? arg) (force arg))
               (else '())))
            args)
           (display (string-append "</" (symbol->string 'x) ">"))))))))

(generate-html-tag html)
(generate-html-tag head)
(generate-html-tag body)
(generate-html-tag p)

(force 
 (html
  (head "This is a page head")
  (body
   (p "here is a paragraph")
   (p "here is another"))))

;; above is now correct

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `get-environment-variable'?
Visually impaired? Let me spell it for you (wav file) download WAV