-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

i don't have the magic eye to spot the parenthesis-errors yet

Am 25.09.2011 22:15, schrieb Mark Rathwell:
>> (let [rand (new java.util.Random) nextInt (fn [a] (.nextInt
>> rand))] ((map (print) (iterate ((nextInt "dummy") 0)))))
> 
> extra parenthesis in three places, and the first argument to
> iterate is a function, not a long:
> 
> (let [rand (new java.util.Random) nextInt (fn [a] (.nextInt
> rand))] (map print (iterate nextInt 0)))
> 
> 
> On Sun, Sep 25, 2011 at 3:51 PM, Dennis Haupt
> <d.haup...@googlemail.com> wrote: (let [rand (new java.util.Random)
> nextInt (fn [a] (.nextInt rand))] ((map (print) (iterate ((nextInt
> "dummy") 0)))))
> 
> 
> the error is: java.lang.ClassCastException: java.lang.Integer
> cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0)
> 
> why does it want to cast my "0" to a function? and how can i get
> rid of the dummy parameter [a]?
> 
>> 
>> -- 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 first post. To
>> unsubscribe from this group, send email to 
>> clojure+unsubscr...@googlegroups.com For more options, visit this
>> group at http://groups.google.com/group/clojure?hl=en
> 


- -- 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOgLayAAoJENRtux+h35aG5UgQAJMV850ntNNio3g2HCcaVj4E
LH4KfnIhC0otFrEQQfHg3ha+mBuo9flt55NnHGMfEBNdxCTkfpm0SDzqt6QTKBRA
aGDDJuTyAbmnSvGnOkk60RRqeVS1QOErRyjzrMugNxguNQ5ZUKmZ5GeTndLHn0w0
g81CRfF0CSLD8j9ng98iJOdn/VwyijeATQo2b/DQhkyKHyFzlyGT3LXrRgWYAI5o
NbCzMC1K/0o9LPyP9TGBvOoRrKQ28WzMsJGWhV0bWNmsMzeZokE99UDSUvYpRM+f
OpyL/4MCkW6f1imGWzLpSBMHZqLSwkXX7U2fNrMGj1zi4knir/D3LF+aw5XLmkms
oS6IO5qnttQ1IHCsdC9nflYfk891CNEwgGS9jG7RPJ75Zls6VzYL6zT8V/RN1xr3
3s2fYVH2elIM1SVXphTRsY5bqw7xNa0Jti8ual9j5+t+HiQ8qyqX6Yxf6KQZ+9Ux
EkfpjjFw2Fh4JpJ9dYK1sOncho9j18TLE6afUuTLPYqPlhV5b0AcpPJ3XEA0ayef
U2Plapgp4Jxk6IMGAoMyD/fyaRkiOKIQw+TucWc4F2icX10LjVbM2eacyKLwvwPo
gmgGHfNyRj4dHOmRv40x9JheRiqJdXtuoWEks9wSY3D6sUS3qWNplCwfpJMWhIhT
Dc/HVQYRIunjZ+cGALHQ
=It6H
-----END PGP SIGNATURE-----

-- 
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 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to