From 06c239e4f44849a3e4c8317194caacbcc47fc2d4 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 14 Sep 2025 12:12:13 +0200 Subject: de/fn, loop parameter lists use square brackets --- docs/reference/03-3_functions.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'docs/reference/03-3_functions.md') 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))) -- cgit v1.2.3