emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] ob-clojure will error result when contains comment


From: address@hidden
Subject: [O] ob-clojure will error result when contains comment
Date: Thu, 13 Jul 2017 08:32:39 +0800

Here is the examples:

#+BEGIN_SRC clojure
(+ 1 1) ;=> 2
#+END_SRC

#+RESULTS:
: class clojure.lang.LispReader$ReaderExceptionclass java.lang.RuntimeExceptionRuntimeException EOF while reading, starting at line 1  clojure.lang.Util.runtimeException (Util.java:221)

#+BEGIN_SRC clojure :results value
(def sum1 #(reduce + %))
(def avg1 #(/ (sum %) (count %)))

(defn stats
  [numbers]
  (map #(% numbers) [sum1 count avg1]))

(stats [3 4 10])
;; => (17 3 17/3)

(stats [80 1 44 13 6])
;; => (144 5 144/5)
#+END_SRC

#+RESULTS:
: class clojure.lang.LispReader$ReaderExceptionclass java.lang.RuntimeExceptionRuntimeException EOF while reading, starting at line 1  clojure.lang.Util.runtimeException (Util.java:221)


[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]