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:)
精彩评论