Welcome to the CHICKEN Scheme pasting service

build-form pasted by Michael on Sun Aug 19 20:24:10 2012

(define (build-form array)
	(if (list? array)
		(map (lambda (thingy) 
			(if (first thingy)
				`(div (@ (class "label")) (label (@ (for ,(first thingy))) ,(first thingy) ":"))
			,(if (second thingy)
				`(div (@ (class "input")) (input (@ (type "textbox") (name ,(first thingy)) (value ,(with-output-to-string (lambda () (pp (second thingy))))))))
				`()))
			`())
		array) '()))

no title added by andyjpb on Sun Aug 19 20:26:56 2012

(define (build-form array)
  (if (list? array)
    (map (lambda (thingy)
	   (if (first thingy)
	     `(div (@ (class "label")) (label (@ (for ,(first thingy))) ,(first thingy) ":"))
	     ,(if (second thingy)
		`(div (@ (class "input")) (input (@ (type "textbox") (name ,(first thingy)) (value ,(with-output-to-string (lambda () (pp (second thingy)))))))))
		;`()))
	   ;`())
	   ))
	 array) ))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What does `(string? 42)' produce?
Visually impaired? Let me spell it for you (wav file) download WAV