开发者

LISP to c# conversion

开发者 https://www.devze.com 2023-02-21 19:42 出处:网络
Please help convert a small LISP code to c# (开发者_如何学JAVAmult s (diff (const 1) (mult (ramp 1) (ramp 1))))

Please help convert a small LISP code to c#

(开发者_如何学JAVAmult s (diff (const 1) (mult (ramp 1) (ramp 1))))


LISP and C# both use prefix function call notation. The big differences are that in LISP you put parentheses around the whole expression and whitespace delimits parameters, while in C# you put the open paren after the function name and commas delimit parameters. Here's how you'd write your expression in C# (assuming the same function names):

mult(s, diff(const(1), mult(ramp(1), ramp(1)))


I guess var result = s*(1-Ramp(1)*Ramp(1)); But I have no idea what is the ramp function doing:)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号