[plt-scheme] puzzling bug with (extremely simple) curried, Typed Scheme program

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Mon Oct 20 07:48:28 EDT 2008

Benjamin wrote:

> (define ((good-luck-helper-curried a) b)
>   (printf "~a, ~a!" a b))

I had never seen this style of curried definition before, and would have 
bet that it would raise an error [1], but in fact it works fine in #lang 
scheme. I can find justification for it in PLT Reference 2.14, but not 
in R6RS. I'm curious as to its utility -- does it help in writing 
contracts for higher-order functions? Thanks. --PR

[1] A few days ago I was explaining CPS to a student reading EOPL, and I 
wrote out sum-list/k as an example, and said, "Do you understand?" and 
she said, "No, what is `first'?" So perhaps the HtDP authors are 
correct, and I have not actually learned Scheme.

Posted on the users mailing list.