aboutsummaryrefslogtreecommitdiffstats
path: root/docs/reference/03-3_functions.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference/03-3_functions.md')
-rw-r--r--docs/reference/03-3_functions.md8
1 files changed, 3 insertions, 5 deletions
diff --git a/docs/reference/03-3_functions.md b/docs/reference/03-3_functions.md
index 6715eb7..4fc32ba 100644
--- a/docs/reference/03-3_functions.md
+++ b/docs/reference/03-3_functions.md
@@ -5,8 +5,7 @@ code, amongst other things:
(import* math)
(def add-and-trace
- (fn
- (a b)
+ (fn [a b]
(trace (+ a b))))
(add-and-trace 1 2)
@@ -29,8 +28,7 @@ example is equivalent to the following:
(import* math)
(def add-and-trace
- (fn
- (a b)
+ (fn [a b]
(trace (+ a b)))
(do
@@ -53,5 +51,5 @@ name, so there is the `defn` shorthand, which combines the `def` and `fn`
builtins into a single expression. Compare this equivalent definition of the
`add-and-trace` function:
- (defn add-and-trace (a b)
+ (defn add-and-trace [a b]
(trace (+ a b)))