Skip to content

Instantly share code, notes, and snippets.

@fogfish
Created March 27, 2022 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fogfish/a75c80810aa3ae84fe3af03de9ab1e97 to your computer and use it in GitHub Desktop.
Save fogfish/a75c80810aa3ae84fe3af03de9ab1e97 to your computer and use it in GitHub Desktop.
package ord
/*
Ord : T ⟼ T ⟼ Ordering
Each type implements compare rules, mapping pair of value to enum{ LT, EQ, GT }
*/
type Ord [T any] interface {
Eq[T]
Compare(T, T) Ordering
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment