logo       

array-map! source args: msg#00048

lisp.guile.devel

Subject: array-map! source args

I think the change in 1.6 to array-map! to check for no source args is
too strict, it rejects one source arg, eg.

(array-map! #(1 2) noop #(3 4))
=>
<unnamed port>:1:7: In procedure array-map! in expression (array-map!
#(1 2) noop ...):
<unnamed port>:1:7: At least one source array is required.
ABORT: (misc-error)

I'm thinking of

* ramap.c (scm_array_map_x): Correction to sources list check, only
need at least one source, not two. And use SCM_WRONG_NUM_ARGS() for
the error.

Likewise in the head (which hasn't had this check at all yet).

Attachment: ramap.c.sources.diff
Description: Text document

Attachment: ramap.test
Description: Text document

_______________________________________________
Guile-devel mailing list
Guile-devel@xxxxxxx
http://lists.gnu.org/mailman/listinfo/guile-devel
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise