基本形式:

(input parameters) => expression

其中:运算符“=>”读作“goes to”。

例如:

() => 5 * 3;

(x) => x * x;

x => x * x;  //输入参数个数为1时,可省略括号

(x, y) => x * y;

posted on 2013-08-01 07:19  god with us  阅读(172)  评论(0编辑  收藏  举报