Skip to content

Commit

Permalink
Merge pull request ponylang#9 from jkleiser/master
Browse files Browse the repository at this point in the history
Update methods.md
  • Loading branch information
sylvanc committed Jun 13, 2015
2 parents b08e87d + a0c9072 commit fc8ee51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/expressions/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class C

The function parameters (if any) are specified in parentheses after the function name. Functions that don't take any parameters still need to have the parentheses.

Each parameter is given a name and a type. In our example function `add` has 2 parameters, `x` and `y`, both of which are type `U32`. The values passed to a function call (the `1` and `2` in our example) are called arguments and when the call is made they are evaluated and assigned to the parameters. Parameters may not assigned to within the function, they are effectively declared `let`.
Each parameter is given a name and a type. In our example function `add` has 2 parameters, `x` and `y`, both of which are type `U32`. The values passed to a function call (the `1` and `2` in our example) are called arguments and when the call is made they are evaluated and assigned to the parameters. Parameters may not be assigned to within the function, they are effectively declared `let`.

After the parameters comes the return type. If nothing will be returned this is simply omitted.

Expand Down

0 comments on commit fc8ee51

Please sign in to comment.