diff options
author | Andy Wingo <wingo@pobox.com> | 2011-05-05 23:07:23 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-05-05 23:07:37 +0200 |
commit | a2230b653b86cece1daab09315873b5a4c592d6b (patch) | |
tree | a0a543c5d4a66f5fddb9d99600c55efd64ba0946 /libguile/srfi-1.h | |
parent | e2ccab571e3e756b96b4179769b8fe8821bc28fd (diff) | |
download | guile-a2230b653b86cece1daab09315873b5a4c592d6b.tar.gz |
map and for-each in scheme
* module/ice-9/boot-9.scm (map, for-each): Implement in Scheme instead
of C. There are boot versions before `cond' is defined.
(map-in-order): Define this alias here instead of in evalext.h.
* libguile/eval.c: Stub out the map and for-each definitions to just
call into Scheme.
* libguile/evalext.c: Remove map-in-order definition.
* module/srfi/srfi-1.scm: Replace all calls to map1 with calls to map.
(map, for-each): Define implementations here, in Scheme, instead of in
C.
* test-suite/tests/eval.test (exception:wrong-length, "map"): Update the
expected exception for mapping over lists of different lengths.
* libguile/srfi-1.h:
* libguile/srfi-1.c: Remove map and for-each definitions. Remove the
bit that extended the core `map' primitive with another method: the
right way to do that is with modules.
Diffstat (limited to 'libguile/srfi-1.h')
-rw-r--r-- | libguile/srfi-1.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libguile/srfi-1.h b/libguile/srfi-1.h index 85aa65d0c..13ab067bd 100644 --- a/libguile/srfi-1.h +++ b/libguile/srfi-1.h @@ -39,8 +39,6 @@ SCM_INTERNAL SCM scm_srfi1_find_tail (SCM pred, SCM lst); SCM_INTERNAL SCM scm_srfi1_length_plus (SCM lst); SCM_INTERNAL SCM scm_srfi1_lset_difference_x (SCM equal, SCM lst, SCM rest); SCM_INTERNAL SCM scm_srfi1_list_copy (SCM lst); -SCM_INTERNAL SCM scm_srfi1_map (SCM proc, SCM arg1, SCM args); -SCM_INTERNAL SCM scm_srfi1_for_each (SCM proc, SCM arg1, SCM args); SCM_INTERNAL SCM scm_srfi1_assoc (SCM key, SCM alist, SCM pred); SCM_INTERNAL SCM scm_srfi1_partition (SCM pred, SCM list); SCM_INTERNAL SCM scm_srfi1_partition_x (SCM pred, SCM list); |