[plt-scheme] Conditional bind then do something

From: Grant Rettke (grettke at acm.org)
Date: Wed Feb 25 10:15:24 EST 2009

#!r6rs

(import (rnrs))

(define (some-test arg) #t)

(define do-some-other-func list)

(define (some-function arg)
  (let* ((test (some-test arg))
         (var1 (if test 'a 'b))
         (var2 (if test 'c 'd)))
    (do-some-other-func var1 var2)))

(display (some-function 1))


Posted on the users mailing list.