Closed photoszzt closed 1 year ago
First of all, I'm not a closure programmer. So it might be a very dump question.
(ns jepsen.test (:require [elle.list-append :as a] [elle.txn :as ct] [jepsen.history :as h] [clojure.pprint :refer [pprint]])) (defn -main (pprint (take 100 (ct/wr-txns {:key-count 3}))))
I'm trying to print out some txn history so that I can use the sequence to check my work. But it doesn't compile. lein run gives me this error:
Syntax error macroexpanding clojure.core/defn at (jepsen/test.clj:11:1). pprint - failed: vector? at: [:fn-tail :arity-n :bodies :params] spec: :clojure.core.specs.alpha/param-list (pprint (take 100 (ct/wr-txns {:key-count 3}))) - failed: vector? at: [:fn-tail :arity-1 :params] spec: :clojure.core.specs.alpha/param-list
I don't know what the error messages mean.
Clojure expects functions like defn to take a vector of arguments. Your -main has no argument list. :-)
Thanks. I added an arg and it's working now.
First of all, I'm not a closure programmer. So it might be a very dump question.
I'm trying to print out some txn history so that I can use the sequence to check my work. But it doesn't compile. lein run gives me this error:
I don't know what the error messages mean.