palingdrome problem (4 clojure)

2015-10-07 Thread Roelof Wobben
Hello, I try to solve a problem for 4clojure where I have to make a palingdrome detector. So for trying I did this : (ns fourclojure.core (:gen-class)) (defn palingdrome [string] ( reverse string)) (apply str (palingdrome '( 1 2 3) )) '321' (apply str (palingdrome "Roelof" ))

Re: palingdrome problem (4 clojure)

2015-10-07 Thread Roelof Wobben
rison & input > to reverse. If you don't actually care about the concrete sequence type > (i.e. you only want sensible equality semantics after reversing something), > dropping it as soon as possible may be a better strategy. > > Take care, > Moe > > On Wed, Oct 7

Re: 4clojure count problem

2015-10-04 Thread Roelof Wobben
ess supplied with an initial value, reduce will use the first value > from the collection you supply - every sequence which doesn't start with > "1" will give you the wrong answer. > > Take care, > Moe > > On Sat, Oct 3, 2015 at 9:40 PM, Roelof Wobben <wobben...@gmail.com

Re: 4clojure count problem

2015-10-04 Thread Roelof Wobben
t; > Take care, > Moe > > On Sun, Oct 4, 2015 at 8:40 AM, Roelof Wobben <wobben...@gmail.com > > wrote: > >> Oke, then I hve to find out where to put the initial value. >> >> These two do not work : >> >> (reduce (fn [counter] (inc counter))

4clojure count problem

2015-10-03 Thread Roelof Wobben
Hello, I have to make a function which counts a collection without using count. So I came up with this : (fn [coll] (reduce (fn [counter _ ] (inc counter)) coll))) it works well with coll is [ 1 2 3] but it fails with "Hello World" How can I improve my code to work in both cases. Please

Re: On Testing

2014-11-02 Thread Roelof Wobben
Here a example where midje could provide more info. I have this function : (defn pr134 [element a-seq] (and (contains? a-seq element) (nil? element)) ) and I have this test-function : (ns exercises.core-test (:use midje.sweet) (:use [exercises.core])) (facts about `pr134`

where do I think the wrong way

2014-10-29 Thread Roelof Wobben
Hello, For a exercise I have to add something to the end of a existing map. So I thought this would work : (defn add-author [book new-author] (assoc book (conj :authors new-author))) and call the function with : (add-author little-schemer {:name Gerald J. Sussman}) then I see this

Re: where do I think the wrong way

2014-10-29 Thread Roelof Wobben
) Roelof Op woensdag 29 oktober 2014 12:08:35 UTC+1 schreef James Reeves: On 29 October 2014 11:01, Roelof Wobben rwo...@hotmail.com javascript: wrote: For a exercise I have to add something to the end of a existing map. So I thought this would work : (defn add-author [book new-author

Re: where do I think the wrong way

2014-10-29 Thread Roelof Wobben
James}]}) (def new-author {:name Joe}) (assoc book :authors (conj (get book :authors) new-author)) (update-in book [:authors] conj new-author) (conj book [:authors (conj (:authors book) new-author)]) On 29/10/14 12:20, Roelof Wobben wrote: Thanks James, But how do I use assoc

Re: testing platform , midje or specjl ?

2014-10-28 Thread Roelof Wobben
- they are great. If it helps, I am starting a new project and starting off with clojure.test to see how far that gets me. This is more to do with grass is greener than anything else :). On Sunday, 26 October 2014 17:51:11 UTC, Roelof Wobben wrote: Hello, Im learning clojure

after updating clojure a repl error message

2014-10-27 Thread Roelof Wobben
Hello, I updated my clojure from 1.5.1 to 1.6.0 and after I start lein repl I see this output : ERROR: Unhandled REPL handler exception processing message {:id cd35f8f4-8560-401e-8c70-466e00016c78, :op ack, :port 48024}

Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
Hello, I have this facts. (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) (def wild-seed {:title Wild Seed, :authors [octavia]}) So I thought when I do this : (defn old-book-new-book [book] (get book :authors))

Re: Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
Op maandag 27 oktober 2014 16:07:15 UTC+1 schreef Gary Verhaegen: On Monday, 27 October 2014, Roelof Wobben rwo...@hotmail.com javascript: wrote: Now Im complete confused. I never succeed in reading the value of authors so I can do the set command. Roelof And now you're kind

Re: Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
Op maandag 27 oktober 2014 16:37:49 UTC+1 schreef James Reeves: On 27 October 2014 13:45, Roelof Wobben rwo...@hotmail.com javascript: wrote: Hello, I have this facts. (def octavia {:name Octavia E. Butler :birth-year 1947 :death-year 2006}) So you've

Re: Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
think you're confused on the terminal output. Try typing [octavia] in the repl, and compare the output you get to the above code. Clojure prints out the raw values of any computation, not variable names. On Mon, Oct 27, 2014 at 9:45 AM, Roelof Wobben rwo...@hotmail.com javascript: wrote

Re: Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
27 oktober 2014 16:55:32 UTC+1 schreef Gary Verhaegen: On Monday, 27 October 2014, Roelof Wobben rwob...@hotmail.com wrote: I expected the outcome : *octavia* but I see the output : [{:death-year 2006, :name Octavia E. Butler, :birth-year 1947}] Roelof I see. You will not get

Re: Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
Wierd, also on 1.5.1 I see the same output as 1.6.0. So there is a error in the page or the test are not checking it properly . Pity, this is a way I like to learn. Roelof Op maandag 27 oktober 2014 18:03:29 UTC+1 schreef Roelof Wobben: Thanks. I did a peek at the answer and it seems

Re: Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
answer ( the answer in the text) and aproves the wrong answer. Roelof On Monday, October 27, 2014 8:24:12 PM UTC+1, James Reeves wrote: On 27 October 2014 19:16, Roelof Wobben rwo...@hotmail.com javascript: wrote: Wierd, also on 1.5.1 I see the same output as 1.6.0. So there is a error

Re: Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
:37, Roelof Wobben rwo...@hotmail.com javascript: wrote: of course I can. If I look at answers other people gives then this is the solution : (defn old-book-new-book [book] (assoc book :authors (set (book :authors))) ) and then according to the explanation I would see this output

Re: Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
-year 2006}}} {:title Wild Seed, :authors #{octavia}}) That should work. - James On 27 October 2014 20:20, Roelof Wobben rwo...@hotmail.com javascript: wrote: nope, there is somewhere a error in the example. When I copie it as you made it then I see this error message

Re: Cannot understand why I get this output.

2014-10-27 Thread Roelof Wobben
#{{:name Octavia E. Butler, :birth-year 1947, :death-year 2006}}} {:title Wild Seed, :authors #{octavia}}) That should work. - James On 27 October 2014 20:20, Roelof Wobben rwo...@hotmail.com wrote: nope, there is somewhere a error in the example. When I copie it as you made it then I

testing platform , midje or specjl ?

2014-10-26 Thread Roelof Wobben
Hello, Im learning clojure as the beginnner. When im googeling for a testing platform there seems to be two major choices midje and specjl. Now I see that my learning course from github uses midje. Can I better learn midje and it this one still active maintained or can I better learn specjl.

map problem (Ilove ponies)

2014-10-24 Thread Roelof Wobben
Hello, I have to use map and get a vector of all the second items in a list. I know I can use map to do things with all the items in a list. and with get I can get the second item (get collection 1) map uses this map what_has _to_be_done collection so I thougt this would work (map (get

Re: map problem (Ilove ponies)

2014-10-24 Thread Roelof Wobben
Op vrijdag 24 oktober 2014 14:09:13 UTC+2 schreef Laurens Van Houtven: Hi Roelof, On 24 Oct 2014, at 14:05, Roelof Wobben rwo...@hotmail.com javascript: wrote: I have to use map and get a vector of all the second items in a list. I know I can use map to do things with all the items

Re: map problem (Ilove ponies)

2014-10-24 Thread Roelof Wobben
Thanks, but still very confusing for a beginner. the exercise is talking about using a helper function and it looks like second does the same as (get coll 1 ) Roelof Op vrijdag 24 oktober 2014 14:19:28 UTC+2 schreef Laurens Van Houtven: Hi Roelof, On 24 Oct 2014, at 14:16, Roelof

Re: map problem (Ilove ponies)

2014-10-24 Thread Roelof Wobben
I try to make exercise 16. Roelof Op vrijdag 24 oktober 2014 14:27:19 UTC+2 schreef Laurens Van Houtven: Hi Roelof, I had no idea iloveponies was a Clojure introduction. https://iloveponies.github.io/120-hour-epic-sax-marathon/structured-data.html What exercise are you

Re: map problem (Ilove ponies)

2014-10-24 Thread Roelof Wobben
Yes. I solved the problem with : (defn second-elements [collection] (let [second-item (fn [x] (get x 1))] (map second-item collection))) one thing I m not sure I understand complete. x is the output of the map command, if so, how does Clojure know that. Roelof Op vrijdag 24

Re: map problem (Ilove ponies)

2014-10-24 Thread Roelof Wobben
Op vrijdag 24 oktober 2014 15:32:33 UTC+2 schreef Laurens Van Houtven: Hi Roelof, On 24 Oct 2014, at 15:12, Roelof Wobben rwo...@hotmail.com javascript: wrote: I understand that part but when I look at the map part there is no x. When I look at the function no x. I’m assuming

Re: map problem (Ilove ponies)

2014-10-24 Thread Roelof Wobben
Sorry but I still do not have a clue how clojure knows what x is. the first part where x is mentioned is the fn part and on the map part there is no mention about x. Roelof Op vrijdag 24 oktober 2014 15:51:30 UTC+2 schreef Laurens Van Houtven: Hi Roelof, I understand that part.

Re: map problem (Ilove ponies)

2014-10-24 Thread Roelof Wobben
) with a single argument. In (double 10), I’m calling it with 10. In (map second-item coll), map is calling second-item with each of the items in coll. These are exactly the same thing: in both cases it’s just function application. hth lvh On 24 Oct 2014, at 15:56, Roelof Wobben rwo

how to count items in a list

2014-10-24 Thread Roelof Wobben
Hello, Im at exercise 21 : http://iloveponies.github.io/120-hour-epic-sax-marathon/structured-data.html#exercise-20 Where I have to find out if a sequence has duplicates. But I have no clue how to handle this . I think making a set of it and then map count the old one with the set I have

midje test : Can I only run 1 test

2014-10-21 Thread Roelof Wobben
Hello, I try again to learn clojure by the ponies github pages. But sometimes there is a lot of output of midje. Can I run only 1 test ? Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

book for a beginner with some exercises

2014-10-14 Thread Roelof Wobben
Hello, Is there a book for a beginner in Clojure where I can learn things and practice the things I learned with some exercises ? Roelof -- 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

count not supported on this type

2014-05-09 Thread Roelof Wobben
I try to make this assigment : Write the function (contains-duplicates? sequence) that takes a sequence as a parameter and returns true if sequence contains some element multiple times. Otherwise it returns false. So I did this : (defn contains-duplicates? [a-seq] (let [element (fn

Re: count not supported on this type

2014-05-09 Thread Roelof Wobben
count to each element in the collection. Let's say your collection is: [1 2 3] Then you're trying to evaluate: [(count 1) (count 2) (count 3)] Clojure is raising an exception that says I can't count a number, I can only count collections. - James On 9 May 2014 17:42, Roelof

CompilerException java.lang.IllegalArgumentException: Mismatched argument count to recur

2014-05-06 Thread Roelof Wobben
Hello, I have this form (ns forclojure.core) (defn secondlast [coll counter] (let [ number 0 counter ( - (count coll)2)] (loop [coll counter] (if (== counter number) (first coll) (recur (next coll) (+ counter 1 )) But as soon as I try to

Re: CompilerException java.lang.IllegalArgumentException: Mismatched argument count to recur

2014-05-06 Thread Roelof Wobben
Op dinsdag 6 mei 2014 10:43:40 UTC+2 schreef Benjamin R. Haskell: `loop` expects a vector of binding forms (with initial values), not just a vector of names. (loop [coll counter]; means there is one `loop` binding named `coll`, with the initial value of `counter` To fix that

Re: CompilerException java.lang.IllegalArgumentException: Mismatched argument count to recur

2014-05-06 Thread Roelof Wobben
. Roelof Op dinsdag 6 mei 2014 10:51:09 UTC+2 schreef Roelof Wobben: Op dinsdag 6 mei 2014 10:43:40 UTC+2 schreef Benjamin R. Haskell: `loop` expects a vector of binding forms (with initial values), not just a vector of names. (loop [coll counter]; means there is one `loop` binding named

Re: CompilerException java.lang.IllegalArgumentException: Mismatched argument count to recur

2014-05-06 Thread Roelof Wobben
) (first coll) (recur (next coll) (+ number 1)) But when I do (secondlast (list 1 2 3 4 5)) I still do not get a answer, Roelof - James On 6 May 2014 11:24, Roelof Wobben rwo...@hotmail.com javascript:wrote: I changed everything to this : (ns forclojure.core) (defn

Re: CompilerException java.lang.IllegalArgumentException: Mismatched argument count to recur

2014-05-06 Thread Roelof Wobben
As far as I understand recur is going back to the loop so number is never going back to 0 but I see the problem (-(count coll)2 is changing it value and that schould not happen. So I think I have to set the initial value of counter in the let. what schould happen is this coll

Re: CompilerException java.lang.IllegalArgumentException: Mismatched argument count to recur

2014-05-06 Thread Roelof Wobben
there will be : (first(drop(reverse v)) Roelof Op dinsdag 6 mei 2014 13:36:53 UTC+2 schreef Roelof Wobben: As far as I understand recur is going back to the loop so number is never going back to 0 but I see the problem (-(count coll)2 is changing it value and that schould not happen. So I think I

Re: find the last and the nth item without using last or nth

2014-05-06 Thread Roelof Wobben
cannot figure out what the coll and what the number is ? Roelof Op woensdag 30 april 2014 12:53:01 UTC+2 schreef James Reeves: On 30 April 2014 11:41, Roelof Wobben rwo...@hotmail.com javascript:wrote: Op woensdag 30 april 2014 12:14:39 UTC+2 schreef James Reeves: Consider how you might add

Re: find the last and the nth item without using last or nth

2014-05-06 Thread Roelof Wobben
coll) (+ acc 1) Additionally, you're using an unquoted list to test. Use a vector or quote the list: (nth* [1 2 3 4 5] 2) - James On 6 May 2014 16:05, Roelof Wobben rwo...@hotmail.com javascript:wrote: I tried this problem again. So I did this: (defn nth* [coll, number

why is this failing on a list

2014-05-04 Thread Roelof Wobben
Hello, For 4clojure I have to find the second to last item. So I did this: (fn secondlast [v] (get v (-(count v)1))) Now it's only failing at this test : (= (__ (list 1 2 3 4 5)) 4) Can anyone tell me where I did take the wrong way. Roelof -- You received this message because you

Re: why is this failing on a list

2014-05-04 Thread Roelof Wobben
. (fn secondlast [v] (nth v (-(count v)1))) Roelof Op zondag 4 mei 2014 16:49:45 UTC+2 schreef Lee: On May 4, 2014, at 10:42 AM, Roelof Wobben rwo...@hotmail.comjavascript: wrote: For 4clojure I have to find the second to last item. So I did this: (fn secondlast [v

Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Roelof Wobben
Hello, Im now at the last exercise of the beginners exercise of 4clojure. I figured out that this solution works. (fn [default lijst1] (loop [lijst lijst1 d {}] (if (empty? lijst) d (recur (rest lijst) (assoc d (first lijst) default) But as I see it lijst lijst 1 and

Re: Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Roelof Wobben
(fn [default initial-keys] (loop [remaining-keys initial-keys result-map {}] (if (empty? remaining-keys) result-map (let [key (first remaining-keys) remaining-keys' (rest remaining-keys) result-map' (assoc

Re: Do not understand the - macro here

2014-05-01 Thread Roelof Wobben
Is this a nice explanation about macros : http://bryangilbert.com/code/2013/07/30/anatomy-of-a-clojure-macro/ or is there a better one for a beginner. Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Do not understand the - macro here

2014-05-01 Thread Roelof Wobben
it right. this schould be the output of the functions A [ 1 2 3 4 5] B [ 1 2 3 4 5] (= A B 5) -- [1,2,3,4,5] = [1,2,3,4,5] = 5 and this is not true. On Thu, May 1, 2014 at 7:52 AM, Roelof Wobben rwo...@hotmail.comjavascript: wrote: Is this a nice explanation about macros : http

Re: Do not understand the - macro here

2014-05-01 Thread Roelof Wobben
in this case makes [1 2 3 4 5] to 5 On Thu, May 1, 2014 at 4:23 PM, Maik Schünemann maiksch...@gmail.comjavascript: wrote: On Thu, May 1, 2014 at 3:51 PM, Roelof Wobben rwo...@hotmail.comjavascript: wrote: Op donderdag 1 mei 2014 15:20:38 UTC+2 schreef Erlis Vidal: I think

find the last and the nth item without using last or nth

2014-04-30 Thread Roelof Wobben
Hello, IM busy with 4Clojure and I have now two challenges which I think can be solved the same way. On a list I first have to find the last item of a list without using last and after that I have to do the same for a nth item and im not allowed to use nth. Now I can convert the list to a

Re: find the last and the nth item without using last or nth

2014-04-30 Thread Roelof Wobben
? Look at the length. If it has one element , see question 1 if it has 2 elements, see question 3. - James On 30 April 2014 07:08, Roelof Wobben rwo...@hotmail.com javascript:wrote: Hello, IM busy with 4Clojure and I have now two challenges which I think can be solved the same

Re: find the last and the nth item without using last or nth

2014-04-30 Thread Roelof Wobben
Op woensdag 30 april 2014 08:22:07 UTC+2 schreef Tassilo Horn: Roelof Wobben rwo...@hotmail.com javascript: writes: Could a recurvice way or a loop do the trick. Yes. And how do I then take the right value. For nth, you need a counter that you can increment in each recursion

Re: find the last and the nth item without using last or nth

2014-04-30 Thread Roelof Wobben
Op woensdag 30 april 2014 08:50:22 UTC+2 schreef Roelof Wobben: Op woensdag 30 april 2014 08:22:07 UTC+2 schreef Tassilo Horn: Roelof Wobben rwo...@hotmail.com writes: Could a recurvice way or a loop do the trick. Yes. And how do I then take the right value. For nth, you need

Re: find the last and the nth item without using last or nth

2014-04-30 Thread Roelof Wobben
Op woensdag 30 april 2014 09:58:26 UTC+2 schreef James Reeves: On 30 April 2014 07:49, Roelof Wobben rwo...@hotmail.com javascript:wrote: Op woensdag 30 april 2014 08:21:40 UTC+2 schreef James Reeves: 1. How do you find the last element of a seq with exactly one element? the last

Re: find the last and the nth item without using last or nth

2014-04-30 Thread Roelof Wobben
Op woensdag 30 april 2014 09:58:26 UTC+2 schreef James Reeves: On 30 April 2014 07:49, Roelof Wobben rwo...@hotmail.com javascript:wrote: Op woensdag 30 april 2014 08:21:40 UTC+2 schreef James Reeves: 1. How do you find the last element of a seq with exactly one element? the last

Re: find the last and the nth item without using last or nth

2014-04-30 Thread Roelof Wobben
Op woensdag 30 april 2014 12:14:39 UTC+2 schreef James Reeves: On 30 April 2014 10:41, Roelof Wobben rwo...@hotmail.com javascript:wrote: Op woensdag 30 april 2014 09:58:26 UTC+2 schreef James Reeves: Unlike vectors, seqs are simple structures and don't know their own length. You

Do not understand the - macro here

2014-04-30 Thread Roelof Wobben
On 4 clojure there it this exercise: (= (__ (sort (rest (reverse [2 5 4 1 3 6] (- [2 5 4 1 3 6] (reverse) (rest) (sort) (__)) 5) if I understand it right this is happen reverse[ 2 5 4 1 3 6] gives [ 6 3 1 4 5 2 ] Then rest [ 6 3 1 4 5 2] gives [ 3 1 4 5 2] Sort this and you get [ 1

Re: Do not understand the - macro here

2014-04-30 Thread Roelof Wobben
Op woensdag 30 april 2014 18:46:36 UTC+2 schreef James Reeves: These two forms are equivalent: (__ (sort (rest (reverse [2 5 4 1 3 6] (- [2 5 4 1 3 6] (reverse) (rest) (sort) (__)) The - macro turns the second form into the first. You can see this by running

Re: Do not understand the - macro here

2014-04-30 Thread Roelof Wobben
Op woensdag 30 april 2014 19:12:24 UTC+2 schreef James Reeves: The 5 is just the last part of the equality statement. This might be easier to see by adding in a let: (let [x (__ (sort (rest (reverse [2 5 4 1 3 6] y (- [2 5 4 1 3 6] (reverse) (rest) (sort) (__))] (= x y 5))

Re: Do not understand the - macro here

2014-04-30 Thread Roelof Wobben
to find out and do not understand is how it boils down to that question. Why make a difficult thing if you could also write down the question that you have asked. Roelof On 30 April 2014 18:18, Roelof Wobben rwo...@hotmail.com javascript:wrote: Op woensdag 30 april 2014 19:12:24 UTC+2

cursive plugin question

2014-04-29 Thread Roelof Wobben
Hello, I installed intelij with the cursive plugin. Now I wonder if this can be done in some way. Suppose I have a file with 3 functions. Can I send one to REPL so I can test if it works as I expected. Roelof -- You received this message because you are subscribed to the Google Groups

eclipse REPL problem (no prompt)

2014-04-28 Thread Roelof Wobben
Hello, I try now the eclipse with CounterClockwise plugin. It looks to work fine except one thing. When I open a repl I do not see a sort of prompt. Does anyone know how to solve this ? Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Which linux distro has intelij ?

2014-04-23 Thread Roelof Wobben
пользователь Roelof Wobben написал: Hello, Does anyone know a Linux distro which I can use to learn clojure and which has inteljij aviable. I really like to test the cursive plugin Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To post

comparison with 3 arguments. Do I understand it right ?

2014-04-23 Thread Roelof Wobben
Hello, I do not understand why this work. I have to check if someone is between 12 and 20 years. So after some trail and error this seems to work (defn teen? [age] (if ( 12 age 20) true; false)) Is it right it stated 12 age 20 ? Roelof -- You received this message because

Re: comparison with 3 arguments. Do I understand it right ?

2014-04-23 Thread Roelof Wobben
)) The if statement is unnecessary. - James On 23 April 2014 11:11, Roelof Wobben rwo...@hotmail.com javascript:wrote: Hello, I do not understand why this work. I have to check if someone is between 12 and 20 years. So after some trail and error this seems to work (defn teen? [age

Re: comparison with 3 arguments. Do I understand it right ?

2014-04-23 Thread Roelof Wobben
Op woensdag 23 april 2014 13:23:17 UTC+2 schreef David Della Costa: What James meant was that you should use it like so: = (defn teen? [age] ( 12 age 20)) #'user/teen? = (teen? 50) false = (teen? 10) false = (teen? 14) true = (if (teen? 14) yes is a teen no, not a teen)

Re: comparison with 3 arguments. Do I understand it right ?

2014-04-23 Thread Roelof Wobben
Op woensdag 23 april 2014 14:26:14 UTC+2 schreef Tassilo Horn: Roelof Wobben rwo...@hotmail.com javascript: writes: The only thing which is failing now is this one ; (defn abs [x] ( x 0) (* x -1); x) I keep getting -2 as answer where it must be 2 Well

Re: comparison with 3 arguments. Do I understand it right ?

2014-04-23 Thread Roelof Wobben
Chips I thought I understand it But this does not work (defn divides? [divisor n] (mod n divisor)) I still get a cannot be cast error message. Roelof Op woensdag 23 april 2014 14:32:41 UTC+2 schreef Roelof Wobben: Op woensdag 23 april 2014 14:26:14 UTC+2 schreef Tassilo Horn: Roelof

Re: comparison with 3 arguments. Do I understand it right ?

2014-04-23 Thread Roelof Wobben
Op woensdag 23 april 2014 14:55:39 UTC+2 schreef Tassilo Horn: Roelof Wobben rwo...@hotmail.com javascript: writes: Chips I thought I understand it But this does not work (defn divides? [divisor n] (mod n divisor)) It seems that `divides?` should be a predicate but your

Re: comparison with 3 arguments. Do I understand it right ?

2014-04-23 Thread Roelof Wobben
found the solution: (defn divides? [divisor n] (zero? (mod n divisor))) Roelof Op woensdag 23 april 2014 14:59:31 UTC+2 schreef Roelof Wobben: Op woensdag 23 april 2014 14:55:39 UTC+2 schreef Tassilo Horn: Roelof Wobben rwo...@hotmail.com writes: Chips I thought I understand

Which linux distro has intelij ?

2014-04-22 Thread Roelof Wobben
Hello, Does anyone know a Linux distro which I can use to learn clojure and which has inteljij aviable. I really like to test the cursive plugin Roelof -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

boolean problem

2014-04-17 Thread Roelof Wobben
Hello, IM working at the Iloveponies github tutorial and Im stuck here, I have to check if x is a nil or false and then the output must be false,\ Otherwise I have to be true. So I tried this : (defn boolean [x] (if (and (nil? x) (false? x)) ) But then I see a very long error message:

Re: boolean problem

2014-04-17 Thread Roelof Wobben
Op donderdag 17 april 2014 09:34:52 UTC+2 schreef Tassilo Horn: Stanislas Nanchen stanisla...@gmail.com javascript: writes: You miss one parentheses at the end of your expression (defn boolean [x] (if (and (nil? x) (false? x)) )) And now you have an if without then which

Re: Light table

2014-04-17 Thread Roelof Wobben
die hard. But I expect to move to Light Table at some point. On Wednesday, April 16, 2014 9:42:40 PM UTC+2, Roelof Wobben wrote: Has anyone tried Light table as a IDE instead of Emacs ? Roelof -- You received this message because you are subscribed to the Google Groups Clojure group

Re: boolean problem

2014-04-17 Thread Roelof Wobben
Op donderdag 17 april 2014 13:26:35 UTC+2 schreef Michael Gardner: On Apr 17, 2014, at 02:34 , Tassilo Horn ts...@gnu.org javascript: wrote: And now you have an if without then which will give you another exception. Yep, but that one I solved already. Not true. It's more

Re: Light table

2014-04-17 Thread Roelof Wobben
It seems that Nightcode works What do you experts think of this IDE. Roelof Op donderdag 17 april 2014 13:39:31 UTC+2 schreef Roelof Wobben: Thanks all. Unfortunally I cannot get Lighttable work. I work with Nixos where all the packages are stored in /var/store/nixos/hash instead

is there a way I can learn clojure with a lot of exercises

2014-04-16 Thread Roelof Wobben
Hello, I like to try clojure. I have little or none programming background but I know I learn the best by reading a piece of text and then do exercises about it so I can check if I really understand it. What is then the best way to proceed ? Roelof -- You received this message because you

Re: is there a way I can learn clojure with a lot of exercises

2014-04-16 Thread Roelof Wobben
Thanks, Can this site also be good : http://www.braveclojure.com/ Roelof Op woensdag 16 april 2014 09:07:36 UTC+2 schreef Bruce Wang: Try 4clojure.com On Wed, Apr 16, 2014 at 4:56 PM, Roelof Wobben rwo...@hotmail.comjavascript: wrote: Hello, I like to try clojure. I have

braveclojure problem ( paste into emacs)

2014-04-16 Thread Roelof Wobben
Hello, I try to learn coljure by using this tutorial: http://www.braveclojure.com Im now at point 7 : http://www.braveclojure.com/basic-emacs/ There I must paste a text into emacs. But as far as I know there is no mentioned how I can paste text into emacs. Roelof -- You received this

Re: is there a way I can learn clojure with a lot of exercises

2014-04-16 Thread Roelof Wobben
. As references use clojure-doc.org for tutorials and clojuredocs.org for core function examples. On Wednesday, April 16, 2014 9:53:06 AM UTC+2, Roelof Wobben wrote: Thanks, Can this site also be good : http://www.braveclojure.com/ Roelof Op woensdag 16 april 2014 09:07:36 UTC+2 schreef Bruce

Re: braveclojure problem ( paste into emacs)

2014-04-16 Thread Roelof Wobben
Op woensdag 16 april 2014 12:57:41 UTC+2 schreef Roelof Wobben: Hello, I try to learn coljure by using this tutorial: http://www.braveclojure.com Im now at point 7 : http://www.braveclojure.com/basic-emacs/ There I must paste a text into emacs. But as far as I know

Re: braveclojure problem ( paste into emacs)

2014-04-16 Thread Roelof Wobben
, if Emacs is too difficult to work with, then it's definitely ok to use whatever editor you like most :) Thanks, Daniel On Wednesday, April 16, 2014 6:57:41 AM UTC-4, Roelof Wobben wrote: Hello, I try to learn coljure by using this tutorial: http://www.braveclojure.com Im now at point 7

Re: is there a way I can learn clojure with a lot of exercises

2014-04-16 Thread Roelof Wobben
Op woensdag 16 april 2014 16:43:09 UTC+2 schreef Charlie Griefer: On Apr 15, 2014, at 11:56 PM, Roelof Wobben rwo...@hotmail.comjavascript: wrote: I like to try clojure. I have little or none programming background but I know I learn the best by reading a piece of text and then do

Light table

2014-04-16 Thread Roelof Wobben
Has anyone tried Light table as a IDE instead of Emacs ? Roelof -- 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 your

Do I have to have knowlegde about Lisp

2014-03-10 Thread Roelof Wobben
Hello, I like the idea of Clojure but I wonder if I have to know a lot of Lisp to work with Clojure. What is the best way to go from a absolute beginner to someone who can work with Clojure. Roelof -- You received this message because you are subscribed to the Google Groups Clojure group.

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Roelof Wobben
Op maandag 10 maart 2014 15:41:12 UTC+1 schreef Roelof Wobben: Hello, I like the idea of Clojure but I wonder if I have to know a lot of Lisp to work with Clojure. What is the best way to go from a absolute beginner to someone who can work with Clojure. Roelof -- You received