ope*_*tor 2 julia
是否可以通过添加 Julia 中的其他两个函数来创建一个新函数?我想做这样的事情:
function quadratic(x) return x^2 end function cubic(x) return x^3 end f::Function = quadratic + cubic # such that f(x) returns x^2 + x^3
Osc*_*ith 7
有一个不太神奇的解决方案,那就是f(x) = quadratic(x) + cubic(x)
f(x) = quadratic(x) + cubic(x)
归档时间:
3 年,11 月 前
查看次数:
171 次
最近记录: