summaryrefslogtreecommitdiffhomepage
path: root/julia.html.markdown
diff options
context:
space:
mode:
authorPranit Bauva <pranit.bauva@gmail.com>2015-11-04 23:04:42 +0530
committerPranit Bauva <pranit.bauva@gmail.com>2015-11-04 23:04:42 +0530
commita6927f543ce6aee3ed409d7c88fc3695163c6609 (patch)
treea489d4496d72e0a404e7de31fb62477addc9daee /julia.html.markdown
parent20f8f41ad5631f6638d42aca88ad2e0590abbccb (diff)
Add description about compact assignment of functions
Diffstat (limited to 'julia.html.markdown')
-rw-r--r--julia.html.markdown4
1 files changed, 4 insertions, 0 deletions
diff --git a/julia.html.markdown b/julia.html.markdown
index 2fedcfd8..a9eed2da 100644
--- a/julia.html.markdown
+++ b/julia.html.markdown
@@ -395,6 +395,10 @@ end
add(5, 6) # => 11 after printing out "x is 5 and y is 6"
+# Compact assignment of functions
+f_add(x, y) = x + y # => "f (generic function with 1 method)"
+f_add(3, 4) # => 7
+
# You can define functions that take a variable number of
# positional arguments
function varargs(args...)