Skip to content

Instantly share code, notes, and snippets.

@slipset
Created October 13, 2024 08:29
Show Gist options
  • Save slipset/04213c93008adbb7fa9ce86b0cfa321b to your computer and use it in GitHub Desktop.
Save slipset/04213c93008adbb7fa9ce86b0cfa321b to your computer and use it in GitHub Desktop.
(defn baz [z]
...
(foobar æ))
(defn bar [y]
...
(baz z))
(defn foo [x]
...
(bar y))
;; vs
(defn baz [z]
...
æ))
(defn bar [y]
...
z))
(defn foo [x]
...
z))
;; This gives
(foobar (baz (bar (foo some-value))))
;; or simply
(-> some-value
foo
bar
baz
foobar)
;; Now consider in the first example if you want to _not_ call `foobar` but another fn `foobaz`
;; You're in a bunch of pain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment