Take ideas from Racket
I don't really know much about Racket, but it looks like this facility is a semantic one, which I'm very explicitly trying not to do. That said, if there's particular features in this system that people think are nice, I'd like to hear about it.
Some ideas that come to mind are
-
Blame, especially in higher-order functions. If
map(f, x)goes wrong, whose fault is it: the caller for misusing one of those functions, or the developer off, ormap? It depends. With a first-class concept of "blame", the user is informed where the problem is in each case. See example, and papers linked above. -
Contract combinators, like the
orcombinator that takes two contracts and makes a contract that is satisfied if either of its components is.