map and for-each in scheme
authorAndy Wingo <wingo@pobox.com>
Thu, 5 May 2011 21:07:23 +0000 (23:07 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 5 May 2011 21:07:37 +0000 (23:07 +0200)
commita2230b653b86cece1daab09315873b5a4c592d6b
treea0a543c5d4a66f5fddb9d99600c55efd64ba0946
parente2ccab571e3e756b96b4179769b8fe8821bc28fd
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.
libguile/eval.c
libguile/evalext.c
libguile/srfi-1.c
libguile/srfi-1.h
module/ice-9/boot-9.scm
module/srfi/srfi-1.scm
test-suite/tests/eval.test