Thanks, I have pushed a fix and additional tests for error messages. This will 
be included with the next release, to appear in a couple of weeks. — Matthias




> On Apr 11, 2016, at 9:25 PM, Elena Machkasova <ele...@morris.umn.edu> wrote:
> 
> Hi All, 
> 
> we have discovered that in 6.4 DrRacket (Advanced Student) seems to have a 
> bug generating error messages for foldl/foldr:
> 
> (foldl + (list 2 3 4) 0) 
> 
> gives an error message "foldl: 2th argument must be a list, given 0" 
> (in addition to the incorrect "th" for "2nd", the 0 is actually the third 
> argument, not second). 
> 
> There is also a somewhat misleading error (for beginners) in 6.4 and earlier 
> versions, shown with a somewhat artificial example: 
> 
> (map (lambda (x y) (+ x y)) (list 2 3 4))
> 
> gives and error:
> 
> the given procedure's expected number of arguments does not match
> the given number of lists
>  given procedure: #<procedure>
>  expected: 2
>  given: 1 
> 
> This is technically correct, but not understandable to a student since most 
> likely they mistakenly used a two-argument function instead of a one-argument 
> one. In fact, students are never shown a map with multiple lists. A better 
> message would say that a one-argument function was expected, but a 
> two-argument function was given. 
> 
> The second error is somewhat of a design choice, but the first one (with 
> foldl) is a bug. If there is a way to patch it in 6.4, that would be greatly 
> appreciated. 
> 
> Cheers,
> Elena
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to