๐งฌ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)