mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
9 lines
93 B
V
9 lines
93 B
V
module genericmodule
|
|
|
|
pub fn take<T>(a bool, b T, c T) T {
|
|
if a {
|
|
return b
|
|
}
|
|
return c
|
|
}
|