pasteNotesIntoClip

Hi,
In the method :

juce::Array<MidiNote*> pasteNotesIntoClip (MidiClip&, const juce::Array<MidiNote*>& selectedNotes,
                                                   TimePosition cursorPosition, const std::function<BeatPosition (BeatPosition)>& snapBeat) const;

of MIDIEvents i did not understand the snapBeat callback.
Can someone provides me an example of it ?
Thanks.