Created
May 31, 2020 17:41
-
-
Save jordan-chalupka/b3ccb4e5b351519bcf846eb899639ef4 to your computer and use it in GitHub Desktop.
Using impl to create an implementation of the sort interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Len is the number of elements in the collection. | |
func (Foo) Len() int { | |
panic("not implemented") // TODO: Implement | |
} | |
// Less reports whether the element with | |
// index i should sort before the element with index j. | |
func (Foo) Less(i int, j int) bool { | |
panic("not implemented") // TODO: Implement | |
} | |
// Swap swaps the elements with indexes i and j. | |
func (Foo) Swap(i int, j int) { | |
panic("not implemented") // TODO: Implement | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment