Functions in Rascal:

You may define functions in either one or more variables:

   >f(x)=2*x+7;
   >f(-3)
    1
   >average3(a,b,c)=(a+b+c)/3;
   >average3(4,2,9)
    5

Functions in more than one variable can be evaluated with less parameters
than demanded. Then the current value of the unspecified variable will be
used as default parameter or zero if it is undefined.

   >force(weight,gravity)=weight*gravity;
   >gravity=9.81;
   >force(76)
    745.56
   >force(76,1.6)
    121.6