1
votes

I'm looking at the source code here which has expressions like

(: track->notes (MIDITrack -> (Listof Note)))

what is the : function?

I suspect it has something to do with contracts, but can't find a reference in the documentation.

1
No idea, but the Racket documentation supports token searches: docs.racket-lang.org/search/index.html?q=%3A - user2864740

1 Answers

3
votes

:, in this context, means "has type". It is part of the Typed Racket extension, which adds static type checking to the language.

Your example states that the function track->notes accepts a MIDITrack and returns a list of Notes.

If you want to find out more, take a look at the Typed Racket documentation.