Also, pop throws an exception on the empty list whereas rest returns ().
On Thursday, May 30, 2013 at 12:43:14 AM UTC-4, Seven Hong wrote:
>
> Hi all,
>
> Could some one explain what's the difference between first and peek, rest
> and pop? For me it looks like they behave exactly same on sequence
can
see some of my Clojure work on github (github.com/ECAllen). I also have
private repositories with more Clojure work.
If you are interested my skype name is ethan_allen_
Thanks
Ethan
On Feb 19, 2014 9:41 AM, "Paul Stadig" wrote:
> Hey everyone,
> A couple of months ago Alexey
I think it's important that Clojure be good at exploring Java
libraries. Helpful and correct error messages are important for this.
I often go looking for a function at the REPL, like so:
user=> substring
java.lang.Exception: Unable to resolve symbol: substring in this
context (NO_SOURCE_FILE:
Makes sense, but (#{:a :b :c} :b) doesn't return 'true', it
returns :b. So it's not really acting like an object to boolean
mapping. Doesn't much matter, though.
By the way, I'd like to see map-map in the core.
-Ethan
On Jan 12, 5:30 pm, Stuart Sierra wr
Then why are sets callable? Not that I'm complaining - I found it
handy, then came to wonder why lists aren't.
-Ethan
> I'd just like to add to this discussion that maps and vectors are
> functions not just because it's neat or possible, with the
> implementation o
Why aren't all sequences callable, i.e. why don't they all implement
IFn? I'd like to use lists like this sometimes.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email
Right, the outer parenthesis denote a list. That list contains only
one element. The element is the vector ["qui" "ui" "i"]
On Thu, Dec 11, 2008 at 9:43 PM, Stephen C. Gilardi wrote:
>
> In the latter case the result is a seq containing a single element:
> the vector. There is nothing to sort/
It's very handy to be able to type in a symbol at the REPL and see its value.
On Sun, Nov 30, 2008 at 10:15 AM, Mark Volkmann
<[EMAIL PROTECTED]> wrote:
>
> On Sun, Nov 30, 2008 at 10:35 AM, Paul Barry <[EMAIL PROTECTED]> wrote:
>>
>> It's a minor thing, but wouldn't it be a good idea to put (de
Seconded. As far as I can tell all you can do is go to Sourceforge
and poke around in the source code:
http://clojure-contrib.svn.sourceforge.net/viewvc/clojure-contrib/trunk/src/clojure/contrib/
On Wed, Nov 26, 2008 at 12:26 AM, Ralf Bensmann
<[EMAIL PROTECTED]> wrote:
> ?
>
> On Mon, Nov 24, 2
For the File / IO things, skip the Java libs - they are pretty low
level. Go with the Jakarta Commons libs:
http://commons.apache.org/io/description.html , as Stuart has
recommended elsewhere.
On Mon, Nov 24, 2008 at 6:48 AM, Stuart Sierra
<[EMAIL PROTECTED]> wrote:
>
> It's useful to know the s
uot;)
> -Stuart
>
> On Nov 16, 9:18 am, Stuart Halloway <[EMAIL PROTECTED]> wrote:
>
> > Hi Ethan
>
> > spit is in Clojure-contrib. I wouldn't expect Clojure to support OS-
> > specific idioms like ~, because Java doesn't.
>
> > Stuart
>
> &
Has the inverse of slurp been added to the core libraries yet? Like this:
(spit "Some text" "/foo.txt")
to make a file called 'foo.txt' containing "Some text".
By the way, it appears that Clojure (or Java) doesn't recognize ~, as
in (slurp "~/foo.txt"). True?
--~--~-~--~~
12 matches
Mail list logo