9 lines
104 B
Go
9 lines
104 B
Go
package super
|
|
|
|
func If[T any](expression bool, t T, f T) T {
|
|
if expression {
|
|
return t
|
|
}
|
|
return f
|
|
}
|