๐ŸงฌGenerics WorkshopWORKSHOP
1
2
3
4
5

Step 1

Define a local type constraint `Number` as `interface { ~int | ~float64 }` and write `Min[T Number](a, b T) T` that returns the smaller value. Test with ints and floats.

โŒ˜ Enter (Mac) ยท Ctrl+Enter (Win/Linux)