Closed jasonhemann closed 1 year ago
The scribble ultimately generated from beginner-funs.rkt contains a potentially confusing mix of conventions of basic type descriptions.
length says it returns a natural-number? random says it returns a natural list-ref consumes a natural? list? consumes any string-length returns nat make-list consumes natural-number and any/c
natural-number?
natural
natural?
any
nat
natural-number
any/c
Shouldn't there be a fixed convention, be it contract-style /c, predicatized ?, or some non-predicate name for an underlying base type?
/c
?
Closed with 5ddbcc821f6dc8bcfaaebd22b208e0269caaa64f
BTW: These were representative examples, not an exhaustive list.
Sure, I’ll fix others by need, my favorite working mode and unfavorite PL :-)
The scribble ultimately generated from beginner-funs.rkt contains a potentially confusing mix of conventions of basic type descriptions.
length says it returns a
natural-number?
random says it returns anatural
list-ref consumes anatural?
list? consumesany
string-length returnsnat
make-list consumesnatural-number
andany/c
Shouldn't there be a fixed convention, be it contract-style
/c
, predicatized?
, or some non-predicate name for an underlying base type?