Subject: Re: power-set
From: (Rob Warnock)
Date: 1999/11/16
Newsgroups: comp.lang.scheme
Message-ID: <80qklg$>
<> wrote:
| Who knows the power-set routine  in Scheme? I have several versions
| in Lisp, but don't know how to translate it into Scheme.

Translating simple functions from Common Lisp to Scheme is usually
fairly straightforward, e.g.:

	(defun foo (a b c) ...)     ==>  (define (foo a b c) ...)

	(defparameter foo init-val) ==>  (define foo init-val)

	(multiple-value-bind        ==>  (call-with-values
	  (a b c) (some-mv-func)           some-mv-func
	  ...body...)                      (lambda (a b c)

	(mapcar #'func lists...)    ==>  (map func lists...)

	(mapc #'func lists...)      ==>  (for-each func lists...)

What part of the translation are you having trouble with?
Show us one of your Lisp versions and what you tried to
translate it into, and maybe we could help with that.


Rob Warnock, 8L-846
Applied Networking
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		FAX: 650-933-0511
Mountain View, CA  94043	PP-ASEL-IA