Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Every? return nil?

Received: by 10.100.24.10 with SMTP id 10mr1436385anx.36.1316380737479;
        Sun, 18 Sep 2011 14:18:57 -0700 (PDT)
X-BeenThere: 4clojure@googlegroups.com
Received: by 10.101.12.9 with SMTP id p9ls15002613ani.6.gmail; Sun, 18 Sep
 2011 14:18:57 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.50.2 with SMTP id x2mr344042anx.35.1316380736962; Sun, 18
 Sep 2011 14:18:56 -0700 (PDT)
Received: by z18g2000yqb.googlegroups.com with HTTP; Sun, 18 Sep 2011 14:18:56
 -0700 (PDT)
Date: Sun, 18 Sep 2011 14:18:56 -0700 (PDT)
In-Reply-To: <3e83da1d-dd2c-4b5d-a420-f8443b9db730@k15g2000yqd.googlegroups.com>
References: <8ac65395-aa13-40d5-9d04-1eac52e65492@t29g2000vby.googlegroups.com>
 <3e83da1d-dd2c-4b5d-a420-f8443b9db730@k15g2000yqd.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8)
 AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.163 Safari/535.1,gzip(gfe)
Message-ID: <d0260222-7831-4dfa-8f38-11f034fb73a7@z18g2000yqb.googlegroups.com>
Subject: Re: Every? return nil?
From: Matt McSwain <mattmcsw...@gmail.com>
To: 4Clojure <4clojure@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks for the response. Turns out it's an issue with the textmate
bundle, not clojure. It always returns nil instead of false.

On Sep 17, 10:06=A0am, panther-tamer <panther.tamer.awes...@gmail.com>
wrote:
> There was an issue on this:http://code.google.com/p/clojure/issues/detail=
?id=3D68
>
> I`m not sure in which release it was fixed. I use 1.2.1 and it`s OK.
>
> Regards,
> PT
> On Sep 17, 4:42=A0am, Matt McSwain <mattmcsw...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I'm working on 4clojure's palindrome detector here
>
> >http://4clojure.com/problem/27
>
> > I'm using every? and the answer only excepts true or false, and every?
> > seems to be returning nil instead of false.
>
> > When I eval it in textmate it returns nil, but when I test every? in
> > the repl, it does return false. Here is my code
>
> > (def run
>
> > =A0 (fn [coll]
> > =A0 =A0 =A0 =A0 (let [size (count coll)
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 half (. Math floor (/ size 2))
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 palin-lst (for [i (range half)] (=3D (get c=
oll i) (get coll (-
> > size 1 i))))]
> > =A0 =A0 =A0 =A0 =A0 (every? #(=3D true %) palin-lst)))
> > )
>
> > (run "racecar") ;true
> > (run '(1 2 2 1)) ;true
> > (run [1 2 3 4 5 6]) ;nil instead of false
>
> > Thanks