[pypy-commit] lang-scheme default: Mock-up Implementation of for-each
boemmels
noreply at buildbot.pypy.org
Sat Dec 3 18:21:57 CET 2011
Author: Juergen Boemmels <boemmels at web.de>
Branch:
Changeset: r22:195698c3612c
Date: 2011-11-29 21:47 +0100
http://bitbucket.org/pypy/lang-scheme/changeset/195698c3612c/
Log: Mock-up Implementation of for-each
diff --git a/scheme/procedure.py b/scheme/procedure.py
--- a/scheme/procedure.py
+++ b/scheme/procedure.py
@@ -262,6 +262,14 @@
# XXX need to find out how to do this tailrecusive
return (Reverse().procedure(ctx,[w_rev_result]), None)
+class ForEach(W_Procedure):
+ _symbol_name = "for-each"
+
+ def procedure_tr(self, ctx, lst):
+ # simply relay to map and ignore output
+ (res, ctx) = Map().procedure_tr(ctx, lst)
+ return (w_undefined, ctx)
+
##
# Equivalnece Predicates
##
More information about the pypy-commit
mailing list