I noticed that in the latest version of the docs for BSL, signatures get a mention. Thank you!
There are a couple of small pain points before I can use them, however.
-
Could we provide a link to the list of Signatures in 1.15 from section 1.4 where they're discussed? Also, it looks like
ListOf
was left out of the list in section 1.15 and I thinkPosn
should be in there, too, but isn't. -
Also, even if you
(require 2htdp/image)
, you don't get signatures forImage
orColor
, so you can't really use signatures for functions that use these. (Maybe it would be worth it to addMode
, too? You can work aroundColor
andMode
by usingString
and ignoring the symbol variations, but it is nice to get a check when you have"yellew"
instead of"yellow"
.)
But it's almost there! Is it as easy as adding
(define Posn (signature Posn (predicate posn?)))
and similar or do you have to do the (... signature/arbitrary arbitrary-etc (predicate posn?))
that the other signatures use?