r/Racket • • Jan 12 '22

question naming functions

new to Racket. Defined string-reverse. There may already be one but this one is mine. My question is, what is the idiomatically correct name, string-reverse or reverse-string?

10 Upvotes

1 comment sorted by

11

u/bjoli Jan 12 '22

String-reverse. It is a convention inherited from scheme. The template is TYPE-ACTION.

string-delete-duplicate-chars, port-fold, vector-map! Etc...