summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--elixir.html.markdown6
-rw-r--r--solidity.html.markdown1
2 files changed, 6 insertions, 1 deletions
diff --git a/elixir.html.markdown b/elixir.html.markdown
index a74baa38..e82509e7 100644
--- a/elixir.html.markdown
+++ b/elixir.html.markdown
@@ -287,7 +287,11 @@ end
PrivateMath.sum(1, 2) #=> 3
# PrivateMath.do_sum(1, 2) #=> ** (UndefinedFunctionError)
-# Function declarations also support guards and multiple clauses:
+# Function declarations also support guards and multiple clauses.
+# When a function with multiple clauses is called, the first function
+# that satisfies the clause will be invoked.
+# Example: invoking area({:circle, 3}) will call the second area
+# function defined below, not the first:
defmodule Geometry do
def area({:rectangle, w, h}) do
w * h
diff --git a/solidity.html.markdown b/solidity.html.markdown
index 004c225e..c0074b33 100644
--- a/solidity.html.markdown
+++ b/solidity.html.markdown
@@ -111,6 +111,7 @@ contract SimpleBank { // CapWords
/// @return The balance of the user
// 'constant' prevents function from editing state variables;
// allows function to run locally/off blockchain
+ // NOTE: 'constant' on functions is an alias to 'view', but this is deprecated and is planned to be dropped in version 0.5.0.
function balance() constant public returns (uint) {
return balances[msg.sender];
}