Skip to content

Instantly share code, notes, and snippets.

@fogfish
Created March 27, 2022 19:05
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/7a25dacf18d4b1747e9a58d87b72aa25 to your computer and use it in GitHub Desktop.
Save fogfish/7a25dacf18d4b1747e9a58d87b72aa25 to your computer and use it in GitHub Desktop.
// ExampleType product type is product of primitive types int × string
type ExampleType struct {
A int
B string
}
// Instances of Eq type trait for primitive types
var (
Int Eq[int] = FromEq[int](equal[int])
String Eq[string] = FromEq[string](equal[string])
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment