Re: spec and à la carte conformance of map vals (and maybe a bug)

2016-12-19 Thread Alex Miller
On Monday, December 19, 2016 at 2:42:49 PM UTC-6, Josh Tilles wrote: > > Hi all, > > On several occasions, Alex Miller has emphasized that we should be wary of > “baking in” conformers when defining specs. I agree with him, but it’s not > clear to me how to “opt in” to using conformers on map val

Re: What does it mean to say that special forms can't be used as arguments to functions?

2016-12-19 Thread Bobby Eickhoff
Here, "if" is not actually an argument to the + function. The arguments to + are 10 and 1, i.e. (+ 10 1). The reason this is true is because, in Clojure, the arguments to functions are evaluated before the function call, i.e. evaluation is strict. To see an example of how if (and other specia

What does it mean to say that special forms can't be used as arguments to functions?

2016-12-19 Thread Hugh Jass
I read this on page 51 of the book 'Clojure for the Brave and True': Another feature that differentiates special forms is that you can’t use > them as arguments to functions. > So, I expected the following code to fail: (+ (if (> 2 1) 10 1) 1) since I used the 'if' special form as an argument

spec and à la carte conformance of map vals (and maybe a bug)

2016-12-19 Thread Josh Tilles
Hi all, On several occasions, Alex Miller has emphasized that we should be wary of “baking in” conformers when defining specs. I agree with him, but it’s not clear to me how to “opt in” to using conformers on map vals. As far as I can tell, I’m either limited to using unqualified keys —which enabl

Re: results of expression evaluation using clojure in org mode in Emacs with CIDER

2016-12-19 Thread Johannes
Am Montag, 19. Dezember 2016 15:55:25 UTC+1 schrieb ae...@posteo.de: > > 2016-12-19 02:23 -0800, Johannes >: > > > Hi, > > > > without problems I can do something like that: > > > > #+begin_src clojure :results value > > (get [ 1 2 3 4] 3) > > #+end_src > > > > > > #+RESULTS: > > : 4

Re: results of expression evaluation using clojure in org mode in Emacs with CIDER

2016-12-19 Thread aeuii
2016-12-19 02:23 -0800, Johannes : > Hi, > > without problems I can do something like that: > > #+begin_src clojure :results value > (get [ 1 2 3 4] 3) > #+end_src > > > #+RESULTS: > : 4 > > But evaluating > > #+begin_src clojure :results value > [ 1 2 3 4] > #+end_src > > I get > #+RESULTS:

Re: results of expression evaluation using clojure in org mode in Emacs with CIDER

2016-12-19 Thread aeuii
2016-12-19 02:23 -0800, Johannes : > Hi, > > without problems I can do something like that: > > #+begin_src clojure :results value > (get [ 1 2 3 4] 3) > #+end_src > > > #+RESULTS: > : 4 > > But evaluating > > #+begin_src clojure :results value > [ 1 2 3 4] > #+end_src > > I get > #+RESULTS: >

results of expression evaluation using clojure in org mode in Emacs with CIDER

2016-12-19 Thread Johannes
Hi, without problems I can do something like that: #+begin_src clojure :results value (get [ 1 2 3 4] 3) #+end_src #+RESULTS: : 4 But evaluating #+begin_src clojure :results value [ 1 2 3 4] #+end_src I get #+RESULTS: | 1 | 2 | 3 | 4 | instead of [1 2 3 4] My org-mode version: Org-mode v