Re: Applying Java functions

2011-06-17 Thread Konrad Hinsen
On 18 Jun, 2011, at 1:12 , Michael Gardner wrote: > On Jun 17, 2011, at 3:44 AM, Konrad Hinsen wrote: > >> Java methods aren't even first-class objects (nor, in fact, objects at all) >> in the Java world. Clojure can hardly do better than Java in unifying things >> at the JVM level. The one thi

Re: Question about data structures and encapsulation

2011-06-17 Thread Christian Schuhegger
Thanks a lot for the link to the paper about FRP! My personal thinking is going 90% in the same direction that the paper describes. I am happy to see that somebody else did the hard work of writing it down :) Is anybody aware of an implementation of such an approach for Clojure? -- You received

Re: help removing some duplication in my Clojure code

2011-06-17 Thread Alex Baranosky
Awesome! I am still really a beginner with macros. I had tried to get one to work, but wasn't sure if it was possible. Thanks! On Fri, Jun 17, 2011 at 8:59 PM, Ken Wesson wrote: > On Fri, Jun 17, 2011 at 7:32 PM, Alex Baranosky > wrote: > > What is the best way to remove the duplication in t

Re: help removing some duplication in my Clojure code

2011-06-17 Thread Ken Wesson
On Fri, Jun 17, 2011 at 7:32 PM, Alex Baranosky wrote: > What is the best way to remove the duplication in these two functions?: > > (defn- next-day-of-week-in-future [day-num] >   (find-first #(= day-num (.. % dayOfWeek get)) (today+all-future-dates))) > > > (defn- next-day-of-month-in-future [da

Re: What's the best way to test private functions?

2011-06-17 Thread Alex Baranosky
The best way to test private methods is to have very few of them. Test the ones you do have via the public API, and if you have too many then IMHO they should be public methods in a separate namespace. Separate the two namespaces by responsibility. I do this all the time on OOP languages, and th

help removing some duplication in my Clojure code

2011-06-17 Thread Alex Baranosky
What is the best way to remove the duplication in these two functions?: (defn- next-day-of-week-in-future [day-num] (find-first #(= day-num (.. % dayOfWeek get)) (today+all-future-dates))) (defn- next-day-of-month-in-future [day-of-month] (find-first #(= day-of-month (.. % dayOfMonth get))

Re: What's the best way to test private functions?

2011-06-17 Thread Jonathan Fischer Friberg
If you're in a repl*, why not simply use (in-ns ) ? Of course, this wont work in all cases (e.g. testing private functions from two different namespaces). In that case, I find it simpler to remove the '-' temporary. When you're finished, it really doesn't take that much effort to add them again. J

Re: Applying Java functions

2011-06-17 Thread Michael Gardner
On Jun 17, 2011, at 3:44 AM, Konrad Hinsen wrote: > Java methods aren't even first-class objects (nor, in fact, objects at all) > in the Java world. Clojure can hardly do better than Java in unifying things > at the JVM level. The one thing that you can do with a method in Java is call > it, an

Re: Silly algorithm

2011-06-17 Thread Matt Smith
(defn sleepsort [& s] (deref (reduce #(do (await (deref %2)) (deref %2)) nil (doall (map #(future (Thread/sleep (* %1 100)) (send %2 conj %1) %2) s (repeat (agent []))) user=>(sleepsort 2 1 6 5) [1 2 5 6] By having the future return the agent, the reduce then calls deref on all the futures a

Re: clojure-csv Extracting one column from each line

2011-06-17 Thread Miki
So, it looks like by using slurp, there is still > lazy-io going on. > I don't think slurp is lazy. user=> (doc slurp) - clojure.core/slurp ([f & opts]) Reads the file named by f using the encoding enc into a string and returns it. nil user=> -- You received thi

Re: Best practice for distributing a standalone clojure command line utility

2011-06-17 Thread Miki
Not my idea, can't recall where I've seen it first (nvidia driver?) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with y

Re: Radically simplified Emacs and SLIME setup

2011-06-17 Thread Jeff Dik
Mark, I got this same error when I copied and pasted the clojure-jack-in function from gmail. I had to remove newlines from (search-backward "slime-load-hook") and (slime-connect "localhost" clojure-swank-port) Hope that helps, Jeff On Sun, Jun 12, 2011 at 8:50 PM, Mark Engelberg wrote: > e

Re: Radically simplified Emacs and SLIME setup

2011-06-17 Thread Jeff Dik
Phil, This works for me! Thanks! Jeff On Sun, Jun 12, 2011 at 7:51 PM, Phil Hagelberg wrote: > On Jun 12, 10:58 am, Mark Engelberg wrote: >> I take that back (I had edited the wrong file, which wasn't the one my >> emacs was using). >> >> I get the error "Not enough arguments for format strin

Silly algorithm

2011-06-17 Thread Daniel Gagnon
I found on Twitter the implementation of the latest stupid algorithm: sleep sort. The idea behind sleep sort is that you sleep in parallel for a number of second equal to the value of each cell and emit them as you finish sleeping. The algorithm is said to run in O(lol^n) The canonical implementat

RE: BigDecimal Division - Arithmetic Exception

2011-06-17 Thread Bhinderwala, Shoeb
Thanks Ken. That did the trick. -Original Message- From: clojure@googlegroups.com [mailto:clojure@googlegroups.com] On Behalf Of Ken Wesson Sent: Friday, June 17, 2011 3:17 PM To: clojure@googlegroups.com Subject: Re: BigDecimal Division - Arithmetic Exception On Fri, Jun 17, 2011 at 2:5

Re: Screencast: Clojure + Emacs + slime + swank + cake + Overtone

2011-06-17 Thread John Toohey
Excellent screencast. On Thu, Jun 16, 2011 at 11:16, Sam Aaron wrote: > Hi there, > > I just finished making a screencast primarily for new Overtone users on how > to get set up with Emacs as a primary editor: > > http://vimeo.com/25190186 > > It turns out that this should be pretty useful for C

Re: BigDecimal Division - Arithmetic Exception

2011-06-17 Thread Ken Wesson
On Fri, Jun 17, 2011 at 2:51 PM, Bhinderwala, Shoeb wrote: > What is the workaround in Clojure for: > >   (/ 1M 3M) > > I am reading data from the database which by default comes in as BigDecimal > (through the JDBC driver and Clojure SQL). When I perform calculations on > them including division

Re: What's the best way to test private functions?

2011-06-17 Thread Brian Marick
On Jun 17, 2011, at 1:21 PM, Benjamin Esham wrote: > I am writing a library [1] which has only one function that should be > exposed to users. I'd like to be able to test all of the other functions, > which are marked private with "defn-". Of course, these functions are > inaccessible from the tes

Re: map

2011-06-17 Thread lambdatronic
I just have to add that your code is really not idiomatic for Clojure. The do is not required here because there is an implicit do around the body of every fn (including one created with defn). Also, it's somewhat bad form to vertically align parentheses in Lisps. Finally, if you want to place se

Re: Functions destructuring maps in the arglist

2011-06-17 Thread Ken Wesson
On Fri, Jun 17, 2011 at 2:31 PM, Tassilo Horn wrote: > Ken Wesson writes: > > Hi Ken! > >> (defmacro defnm [name argvec & body] >>   `(defn ~name ~argvec >>      (let ~(vec >>              (apply concat >>                (for [a argvec :when (and (map? a) (:or a) (:as a))] >>                  [(:

Multimethod dispatch with predicates in the methods?

2011-06-17 Thread Michael T. Nygard
Hi all, I have some code in Scheme that I'm converting over to Clojure. It frequently uses a dispatching pattern that's very similar to multimethods, but with an inverted approach to the matching predicates. For example, there a generic function "assign-operations". The precise implementation

BigDecimal Division - Arithmetic Exception

2011-06-17 Thread Bhinderwala, Shoeb
What is the workaround in Clojure for: (/ 1M 3M) I am reading data from the database which by default comes in as BigDecimal (through the JDBC driver and Clojure SQL). When I perform calculations on them including division with the '/' operator I get frequent ArithmeticExceptions based on my da

Re: What's the best way to test private functions?

2011-06-17 Thread Tassilo Horn
Benjamin Esham writes: Hi Benjamin, > (defn refer-private [ns] > (doseq [[symbol var] (ns-interns ns)] > (when (:private (meta var)) > (intern *ns* symbol var > > As he says, "this is slightly evil, and I would never recommend it for > any purpose except unit

Re: map

2011-06-17 Thread FD
Thanks I change the function with this one (defn testdoseq [] (do (doseq [x '("a" "b" "c")] (fn1 x) ) (doseq [x '("1" "2" "3")] (fn2 x) ) )) On 17 juin, 20:26, Aaron Cohen wrote: > On Fri, Jun 17, 2011 at 2:13 PM, FD wrote: > > Hello, > > > What is wrong in

Re: A stupid jvm question

2011-06-17 Thread Jason Rogers
I was going to bring up RedBridge as well. Here is Yoko Harada's presentation from RubyConf 2010. Around 14:07 she starts talking about examples of embedding JVM languages within one another (one of the examples is embedding the DataMapper library into a Clojure program). So, it's definitely do-abl

Re: Functions destructuring maps in the arglist

2011-06-17 Thread Tassilo Horn
Ken Wesson writes: Hi Ken! >> That somehow makes sense, but is there some way to get the complete >> map with defaults applied, too? > > (defn foo >  [{:keys [a b] >    :or {a 1 b 2} >    :as all}] >   (let [all (merge {:a 1 :b 2} all)] > [(hash-map :a a :b b) all])) > > Of course this re

Re: map

2011-06-17 Thread Aaron Cohen
On Fri, Jun 17, 2011 at 2:13 PM, FD wrote: > Hello, > > What is wrong in this function? > > (defn testmap [] >  (do >    (map #(fn1 %) >       '("a" "b" "c")) >    (map #(fn2%) >       '("1" "2" "3")) >  )) 1) "for" is lazy, its value is a LazySeq and the contents are only evaluated at need 2) Th

Re: map

2011-06-17 Thread Sean Corfield
On Fri, Jun 17, 2011 at 11:13 AM, FD wrote: >    (map #(fn2%) Needs a space between fn2 and % -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Railo Technologies, Inc. -- http://www.getrailo.com/ "Perfection is the

What's the best way to test private functions?

2011-06-17 Thread Benjamin Esham
Hi all, I am writing a library [1] which has only one function that should be exposed to users. I'd like to be able to test all of the other functions, which are marked private with "defn-". Of course, these functions are inaccessible from the testing namespace (I'm using the testing boilerplate t

Re: map

2011-06-17 Thread Joop Kiefte
Check your spaces... 2011/6/17 FD : > Hello, > > What is wrong in this function? > > (defn testmap [] >  (do >    (map #(fn1 %) >       '("a" "b" "c")) >    (map #(fn2%) >       '("1" "2" "3")) >  )) > If fn1 = fn2 = println > the result is > (1 > 2 > nil 3 > nil nil) > > I expected this result >

map

2011-06-17 Thread FD
Hello, What is wrong in this function? (defn testmap [] (do (map #(fn1 %) '("a" "b" "c")) (map #(fn2%) '("1" "2" "3")) )) If fn1 = fn2 = println the result is (1 2 nil 3 nil nil) I expected this result a b c 1 2 3 Thanks -- You received this message because you are s

Re: Best practice for distributing a standalone clojure command line utility

2011-06-17 Thread Michael T. Nygard
If you use Cake to build your project, then "cake bin" will create a standalone executable. Cheers, -Michael On Jun 16, 2011, at 2:08 PM, Damon Snyder wrote: > Hi Everyone, > I'm have a side project that I'm working on that I want to distribute > as a standalone script. This is probably best il

Re: Java interop: casting

2011-06-17 Thread Mark Rathwell
Yeah, not sure which is better, Java's or C#'s varargs, but it does make things nicer at times. In C#, the method signature signature screams "I AM passing an array", but you can pass arguments either way as in Java. C#: public void UseVarargs(params int[] args) { // Do somet

Re: Java interop: casting

2011-06-17 Thread Gregg Reynolds
On Fri, Jun 17, 2011 at 10:17 AM, Mark Rathwell wrote: > > In Java, varargs are actually converted to arrays at compile time.  It is > really just some syntactic sugar allowing you to use nicer syntax for array > arguments, and you can pass the arguments as an array, or as a comma > delimited sequ

Re: Best practice for distributing a standalone clojure command line utility

2011-06-17 Thread Damon Snyder
Hi Miki, Thats an interesting idea that I had not thought of. It nicely encapsulates everything in one package. Thanks! Damon On Jun 16, 6:15 pm, Miki wrote: > One more option is to embed the jar in base64 encoding in a script, extract > the jar to a temp location and run it. > The following Per

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread octopusgrabbus
Thanks for your answer, David: Eventually, I came back from reading a .csv file using a generic method to closure-csv, and got help wrapping my mind around the data I was getting back from closure-csv/parse and how to pull that apart to get what I wanted. I was also stuck on the notion of having

Re: Applying Java functions

2011-06-17 Thread de1976
Thanks. It really is amazing how non "functional" Java is. Makes me glad there are now languages that do their best to correct that. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note tha

Re: A stupid jvm question

2011-06-17 Thread gaz jones
this page explains a bunch of ways of calling jruby from java: https://github.com/jruby/jruby/wiki/RedBridge think i would have to have pretty good reason before doing this (like wanting to use jruby as a user scripting language in a clojure app maybe)... On Fri, Jun 17, 2011 at 11:08 AM, Phil H

Re: A stupid jvm question

2011-06-17 Thread Stuart Sierra
It's practical. I had a project with Java (source), JRuby, and Clojure all interacting. -S On Friday, June 17, 2011 8:47:09 AM UTC-4, flebber wrote: > > > So it is possible but not practical to call jruby from within a > clojure script? -- You received this message because you are subscribed

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread David Santiago
Also, you don't want to simply split the CSV into lines by looking for newlines. CSVs can contain newlines quoted in fields, so you need to actually parse the CSV with quoting to figure out the line breaks for the file format and ignore the line breaks in the fields. - David On Fri, Jun 17, 201

Re: A stupid jvm question

2011-06-17 Thread Phil Hagelberg
flebber writes: > On Jun 17, 8:39 pm, Zlatko Josic wrote: >> No one question is stupid. Any jvm language can use jvm byte code. >> For example you can use Java libraries in Scala, Clojure,.. >> Of course sometimes it is not natural fit. >> For example if you use Scala in Java you have to know Sc

Re: Java interop: casting

2011-06-17 Thread Mark Rathwell
In Java, varargs are actually converted to arrays at compile time. It is really just some syntactic sugar allowing you to use nicer syntax for array arguments, and you can pass the arguments as an array, or as a comma delimited sequence of arguments. On Fri, Jun 17, 2011 at 10:57 AM, Gregg Reyno

Re: clojure-csv Extracting one column from each line

2011-06-17 Thread octopusgrabbus
Thanks for your answer. I remember the notes on clojure-csv saying it employed lazy I/O. So, it looks like by using slurp, there is still lazy-io going on. On Jun 17, 10:46 am, Miki wrote: > parse-csv returns a sequence of vectors. The "functional way" of traversing > a sequence is using map: > >

Re: Java interop: casting

2011-06-17 Thread Gregg Reynolds
On Thu, Jun 16, 2011 at 6:12 PM, Stuart Halloway wrote: > > Hi Gregg, > It appears that LocalServiceTestHelper's constructor takes an array > of LocalServiceTestConfig. Try > (def bar (LocalServiceTestHelper. (into-array LocalServiceTestConfig [foo]))) > Stu Hi Stu, Would you be the Stuart Hall

Re: clojure-csv Extracting one column from each line

2011-06-17 Thread Miki
parse-csv returns a sequence of vectors. The "functional way" of traversing a sequence is using map: (ns foo (:gen-class) (:use clojure-csv.core)) (defn process-file "Process csv file and prints first item in every row" [file-name] (let [data (slurp file-name) rows (parse-csv

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread Mark Rathwell
Some resources, in case they help: 1. http://clojuredocs.org/ has documentation for core and contrib, and often has examples 2. http://clojure.org has a lot of reading material about the language, including a nice cheat sheet ( http://clojure.org/cheatsheet) 3. http://ww

clojure-csv Extracting one column from each line

2011-06-17 Thread octopusgrabbus
This question is more about knowing what is returned after applying a function and the best "functional programming" practices to use in obtaining particular data in what has been returned. So, given this program: (ns test-csv (:gen-class) (:import (java.io BufferedReader FileReader StringRea

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread Denis Labaye
non-lazy version: (map #(vec (.split % ",")) (vec (.split (slurp "/tmp/foo.csv") "\n")))(["foo" "bar"] ["fu" "bor"]) On Fri, Jun 17, 2011 at 2:39 PM, octopusgrabbus wrote: > Thanks for the reply. In this instance, what's the syntax for map? I'm > trying in REPL and getting a

Re: A stupid jvm question

2011-06-17 Thread Mikhail Kryshen
On Fri, 17 Jun 2011 03:09:46 -0700 (PDT) flebber wrote: > I apologise for the stupidity of this question in advance. > > Just want to clarify. The jvm is great for other languages to be > hosted on clojure, jruby, scala, jython...etc. But what would be > really cool is if we could use the jvm to

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread octopusgrabbus
Many thanks. I didn't recognize the % symbol is used similarly to the way it's used in printf and constructing SQL query string. On Jun 17, 9:07 am, Ken Wesson wrote: > On Fri, Jun 17, 2011 at 8:57 AM, octopusgrabbus > > wrote: > > I'm trying this in REPL > > > timmy=> (def ox [1 2 3 4]) > > #'t

Re: A stupid jvm question

2011-06-17 Thread Zlatko Josic
No, I did'nt mean that. I just talk about if it can be done easily in sence of host language. Write some a code in JRuby, make jar and try it. It's nothing new. Every jvm language use existing libraries. If you want to write a swing application you will use swing library, which is allready writen i

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread Ken Wesson
On Fri, Jun 17, 2011 at 8:57 AM, octopusgrabbus wrote: > I'm trying this in REPL > > timmy=> (def ox [1 2 3 4]) > #'timmy/ox > timmy=> ox > [1 2 3 4] > timmy=> (map #(reduce str/split (seq ox) #",")) > java.lang.IllegalArgumentException: Wrong number of args (1) passed > to: core$map (NO_SOURCE_FI

Re: A stupid jvm question

2011-06-17 Thread Ken Wesson
On Fri, Jun 17, 2011 at 8:47 AM, flebber wrote: > On Jun 17, 8:39 pm, Zlatko Josic wrote: >> No one question is stupid. Any jvm language can use jvm byte code. >> For example you can use Java libraries in Scala, Clojure,.. >> Of course sometimes it is not natural fit. >> For example if you use Sc

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread octopusgrabbus
I'm trying this in REPL timmy=> (def ox [1 2 3 4]) #'timmy/ox timmy=> ox [1 2 3 4] timmy=> (map #(reduce str/split (seq ox) #",")) java.lang.IllegalArgumentException: Wrong number of args (1) passed to: core$map (NO_SOURCE_FILE:0) t On Jun 17, 8:55 am, octopusgrabbus wrote: > I'm used to using t

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread octopusgrabbus
I'm used to using the Python csv package and how that returns lines from a csv. I could not get clojure-csv to split up the line the way I wanted, and also thought about how to clojure.string/split the line. Right now at the repl, I cannot figure out the syntax just to use map on a sequence of numb

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread Michael Wood
Hi On 17 June 2011 00:07, octopusgrabbus wrote: > This Clojure program: > > ns test-csv >  (:require [clojure.contrib.string :as str]) >  (:import (java.io BufferedReader FileReader StringReader)) >  (:use clojure-csv.core)) [...] > I am having trouble figuring out where to call str/split. [...]

Re: A stupid jvm question

2011-06-17 Thread flebber
On Jun 17, 8:39 pm, Zlatko Josic wrote: > No one question is stupid. Any jvm language can use jvm byte code. > For example you can use Java libraries in Scala, Clojure,.. > Of course sometimes it is not natural fit. > For example if you use Scala in Java you have to know Scala compiler > will ge

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread octopusgrabbus
Thanks for the reply. In this instance, what's the syntax for map? I'm trying in REPL and getting a wrong number of arguments (1) passed to core$map. On Jun 17, 7:11 am, Ken Wesson wrote: > On Thu, Jun 16, 2011 at 6:07 PM, octopusgrabbus > > > > > > > > > > wrote: > > This Clojure program: > > >

Re: Functions destructuring maps in the arglist

2011-06-17 Thread Ken Wesson
On Thu, Jun 16, 2011 at 9:51 AM, Tassilo Horn wrote: > Hi all, > > I have some functions that use destructuring on a map parameter, and it > seems I have a false assumption on the workings.  Take for example this > one: > > (defn foo >  [{:keys [a b] >    :or {a 1 b 2} >    :as all}] >  [(hash-map

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread Ken Wesson
On Thu, Jun 16, 2011 at 6:07 PM, octopusgrabbus wrote: > This Clojure program: > > ns test-csv >  (:require [clojure.contrib.string :as str]) >  (:import (java.io BufferedReader FileReader StringReader)) >  (:use clojure-csv.core)) > > > (defn process-file [file-name] >    (with-open [br (Buffered

Re: A stupid jvm question

2011-06-17 Thread Zlatko Josic
No one question is stupid. Any jvm language can use jvm byte code. For example you can use Java libraries in Scala, Clojure,.. Of course sometimes it is not natural fit. For example if you use Scala in Java you have to know Scala compiler will generate set/get methods. Zlaja On Fri, Jun 17, 2011

Re: A stupid jvm question

2011-06-17 Thread Ken Wesson
On Fri, Jun 17, 2011 at 6:09 AM, flebber wrote: > I apologise for the stupidity of this question in advance. Usually, the only stupid question is the one you didn't ask. > Just want to clarify. The jvm is great for other languages to be > hosted on clojure, jruby, scala, jython...etc. But what w

A stupid jvm question

2011-06-17 Thread flebber
I apologise for the stupidity of this question in advance. Just want to clarify. The jvm is great for other languages to be hosted on clojure, jruby, scala, jython...etc. But what would be really cool is if we could use the jvm to create interoperability between the languages so that clojure could

Re: Question about data structures and encapsulation

2011-06-17 Thread Colin Yates
Interesting points. Thanks for the pragmatic advice. Your statement "With that in mind, note that such compositions usually address the problems of structuring a program in some new way, often at run time. Functional programming has lots of its own solutions for such problems" sums up my issue -

Re: Applying Java functions

2011-06-17 Thread Konrad Hinsen
On 17 Jun, 2011, at 9:20 , Ken Wesson wrote: >> Shouldn't it be possible to apply Math/sqrt directly? If I use a >> function from the clojure.core, I can do it: >> user=> (map str (range 1 10)) >> ("1" "2" "3" "4" "5" "6" "7" "8" "9") > > Java methods aren't first-class functions, so they can't b

Re: Modelling complex data structures (graphs and trees for example)

2011-06-17 Thread Andreas Liljeqvist
Surely you must have rooted my box. That is my code more or less :) To the op: Use the immutable structures if possible. Make your types as basic as possible. Use Clojure's higer order functions reduce, map etc I consider loop as a last resort. Then your solution will closely match the problem

Re: Applying Java functions

2011-06-17 Thread Ken Wesson
On Fri, Jun 17, 2011 at 2:59 AM, de1976 wrote: > Hi everyone. Ran into an interesting case here when trying stuff out > in the REPL. > > user=> (Math/sqrt 4) > 2.0 > > user=> (map #(Math/sqrt %) (range 1 10)) > (1.0 1.4142135623730951 ..) > > user=> (map Math/sqrt (range 1 10)) > java.lang.Exc

Applying Java functions

2011-06-17 Thread de1976
Hi everyone. Ran into an interesting case here when trying stuff out in the REPL. user=> (Math/sqrt 4) 2.0 user=> (map #(Math/sqrt %) (range 1 10)) (1.0 1.4142135623730951 ..) user=> (map Math/sqrt (range 1 10)) java.lang.Exception: Unable to find static field: sqrt in class java.lang.Math (