Writing code to get the source of a function

2012-08-08 Thread Samuel
Dear all, I am trying to write some code that would take a function name, get its source code, and create a new function based on the source code. Unfortunately, the function 'source' from clojure.repl doesn't seem to be working for the functions I define. Here is my code: (ns test-src.core (:r

Re: Writing code to get the source of a function

2012-08-08 Thread Samuel
). > > > On Wednesday, August 8, 2012 6:25:35 AM UTC-7, Joshua Ballanco wrote: > >> On Wed, Aug 08, 2012 at 09:19:15AM +, Samuel Lê wrote: >> > Dear all, >> > >> > I am trying to write some code that would take a function name, get its >> >

Re: Incanter Hack Day, Sunday 16th October, London

2011-10-13 Thread Samuel
Hi, I can do Benford's law. See you on suday, Samuel On Thu, Oct 13, 2011 at 10:02 AM, Bruce Durling wrote: > I probably won't be able to make it this weekend, but if someone wants > to implement Benford's Law, that would be cool. > > > http://econerdfood.blogspot.com/2011/10/benfords-law-and-de

Difference between clojure.lang.Cons and clojure.lang.PersistenList

2012-01-08 Thread Samuel
Hi and Happy New Year to all the Clojure mailing list, I am am having some trouble with the two classes Cons and PersistentList: user> (class (conj (map #(+ % 1) '(1 2 3)) 4)) clojure.lang.Cons user> (class '(1 2 3 4)) clojure.lang.PersistentList My problem is that list? returns false for a Con

Re: Difference between clojure.lang.Cons and clojure.lang.PersistenList

2012-01-09 Thread Samuel
Yes, seq? works. Thanks for the help! On Sun, Jan 8, 2012 at 9:03 PM, Cedric Greevey wrote: > On Sun, Jan 8, 2012 at 10:30 AM, Samuel Lê wrote: > > Hi and Happy New Year to all the Clojure mailing list, > > > > I am am having some trouble with the two classes Co

Re: i am so bored

2012-01-14 Thread Samuel
Hi there, I was just looking for someone like you. I have started to develop a mathematica clone in clojure (OK, I started. For now it calculates the derivatives and does a bit of expression simplification). For now I have couple of function that I test on the REPL. I was trying to write a command

converting a string to a list

2012-01-14 Thread Samuel
Hi, I was wondering if there was a function to convert a list into a string, something like: (string-to-list "abcde") ;; (a b c d e) thanks! Sam -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

Re: converting a string to a list

2012-01-16 Thread Samuel
ot;) > > 2012/1/15 Bruce Durling > >> Sam, >> >> Strings can be turned into sequences with seq. >> >> > (seq "foo") >> (\f \o \o) >> >> The backslashes are because f o and o are character literals. >> >> cheers, &