Skip to content

Conversation

athos
Copy link
Owner

@athos athos commented Aug 21, 2021

As with Clojure CLI's --init option:

$ cat init.clj
(defn fib [n]
  (loop [n n a 0 b 1]
    (if (= n 0)
      a
      (recur (dec n) b (+ a b)))))
$ trench --init init.clj -e '(map fib (range 10))'
(0 1 1 2 3 5 8 13 21 34)
$

@athos athos merged commit 926a128 into main Aug 21, 2021
@athos athos deleted the feature/init-file branch August 21, 2021 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant