htdp
htdp copied to clipboard
[Enhancement] - support `...` in parameter lists as well as function bodies
Re-using ...
notation to support function templates is a great idea and I love the error messages.
(define (f-on-atom an-atom)
(... an-atom ...))
In my context, I also use ...
in the parameter list of my templates, to signal that the parameter list is also templated, by analogy to the ...s in the function body. It's a slight variation on the HtDP/2e textbook style.
(define (f-on-atom ... an-atom)
(... an-atom ...))
However, this gives me a compile-time error message, and a pretty unfriendly one to boot.
define: expected a variable, but found a keyword
.
It would be nice if my templating style were supported out of the box, and only errored if you try to call that incomplete function. Still an improvement would be a more beginner-friendly error message here.
4pm should work just fine tomorrow.
Closing as "Won't fix"