Subject: Re: power-set
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1999/11/16
Newsgroups: comp.lang.scheme
Message-ID: <80qklg$qs38@fido.engr.sgi.com>
<vivideja@my-deja.com> 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)
					     ...body...)

	(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

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