Changes between Initial Version and Version 1 of Ticket #1351, comment 2
- Timestamp:
- 03/10/17 20:31:07 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1351, comment 2
initial v1 1 Another interesting case for which we should probably give an error, but we silently return the wrong result:1 Here's a slightly different but simpler case that exhibits the same error: 2 2 3 3 {{{ … … 7 7 '(print (x y ...) ...)))) 8 8 9 (foo (1 2 3) ((a b) (c d))) 10 11 Error: (map) during expansion of (foo ...) - lists are not of same length: (()) 12 }}} 13 14 Another invocation of the same macro for which we should also give an error, but we silently return the wrong result: 15 16 {{{ 9 17 (foo (1 2) ((a b) (c d) (e f))) => (print (1 a b) (2 c d)) 10 18 }}} 11 19 12 Racket and Guile give an error when you try to invoke this macro , Chibi and Gauche fail exactly in the same way as we do.20 Racket and Guile give an error when you try to invoke this macro with unbalanced argument counts, Chibi and Gauche always stop early. 13 21 14 22 It looks like this is due to how "map" works: It doesn't (always) check the list lengths, it either stops on the shortest list (giving this comment's problematic behaviour) or it gives an error that the lists aren't the same length (giving the error in the ticket body).