Go
- tags: Programming Language
柯里化⌗
func max(a, b int) int {
if a > b {
return a
}
return b
}
func currying(a int) func(int) int {
return func(b int) int {
return max(a, b)
}
}
func max(a, b int) int {
if a > b {
return a
}
return b
}
func currying(a int) func(int) int {
return func(b int) int {
return max(a, b)
}
}