Documentation and examples (and where is the documentation on reduce)?

2010-06-29 Thread michele
I really like Clojure, but as a complete n00b on Lisp languages, it is frustrating that I many times have to hunt high and low for documentation on basic stuff. Recently I saw a code snippet that showed that reduce takes an optional initial value, something I didn't know. When I see something new,

Re: Documentation and examples (and where is the documentation on reduce)?

2010-06-29 Thread David Nolen
On Tue, Jun 29, 2010 at 5:55 AM, michele wrote: > I really like Clojure, but as a complete n00b on Lisp languages, it is > frustrating that I many times have to hunt high and low for > documentation on basic stuff. > > Recently I saw a code snippet that showed that reduce takes an > optional init

Re: Documentation and examples (and where is the documentation on reduce)?

2010-06-29 Thread Meikel Brandmeyer
Hi, On Jun 29, 11:55 am, michele wrote: > Well, to my surprise and frustration, I haven't found any place which > documents that reduce takes an optional initial value. http://richhickey.github.com/clojure/branch-1.1.x/index.html In particular: http://richhickey.github.com/clojure/branch-1.1.

Re: Documentation and examples (and where is the documentation on reduce)?

2010-06-29 Thread Jimmy
> Uh. Sky is falling again. But your are right. Nice examples would be a > nice addition. It's the first thing I'm looking for, when learning > something new. I'm not sure they should go to the reference docs, > though. Ruby is an example of a language that does have some examples in the referenc

Re: Documentation and examples (and where is the documentation on reduce)?

2010-06-29 Thread michele
Silly me. I forgot about (doc …). Thanks for the answers. Well, it's good there is documentation, pity it's all over the place. Meikel, idiots are nice people too, so don't feel bad. But seriously, why do you think we work this hard to make the computer do all this things for us? Because we're l

Re: Documentation and examples (and where is the documentation on reduce)?

2010-06-29 Thread Meikel Brandmeyer
Hi, Am 29.06.2010 um 19:11 schrieb michele: > Meikel, idiots are nice people too, so don't feel bad. But seriously, > why do you think we work this hard to make the computer do all this > things for us? Because we're lazy. Ah. IMHO, computer help us solving problems which we wouldn't have withou

Re: Documentation and examples (and where is the documentation on reduce)?

2010-06-30 Thread michele
Mother's invention is a lazy necessity, I think. On Jun 29, 9:46 pm, Meikel Brandmeyer wrote: > Hi, > > Am 29.06.2010 um 19:11 schrieb michele: > > > Meikel, idiots are nice people too, so don't feel bad. But seriously, > > why do you think we work this hard to make the computer do all this > >

Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-02 Thread Walter van der Laan
You can find a lot of examples using http://github.com/defn/walton For example you can point your browser at http://getclojure.org:8080/examples/reduce for reduce examples. On Jun 30, 8:08 am, michele wrote: > Mother's invention is a lazy necessity, I think. > > On Jun 29, 9:46 pm, Meikel Brand

Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-02 Thread Meikel Brandmeyer
Hi, On Jul 2, 12:18 pm, Walter van der Laan wrote: > For example you can point your browser > athttp://getclojure.org:8080/examples/reduce > for reduce examples. Is it necessary to have >250 examples for a function which has effectively five variations? (reduce + []) (reduce + [1]) (reduce +

Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-02 Thread Mike Meyer
On Fri, 2 Jul 2010 07:50:45 -0700 (PDT) Meikel Brandmeyer wrote: > On Jul 2, 12:18 pm, Walter van der Laan > wrote: > > For example you can point your browser > > athttp://getclojure.org:8080/examples/reduce > > for reduce examples. > Is it necessary to have >250 examples for a function which ha

Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-02 Thread Ryan Waters
n00b question: Why is [1 2 3] idiomatic and not '(1 2 3) ? Is it a vectors vs. lists thing, notation thing, or something else? I don't have a lisp background so there's a truckload of lisp reading I still want to do which may answer questions like these for me. If there's a particular text on wh

Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-02 Thread Paul Moore
On 2 July 2010 15:50, Meikel Brandmeyer wrote: > Then there are examples like this one: > (reduce '* '(1 2 3)) > > Someone who is new to Clojure and tries to understand reduce... Does > he understand why the result is 3? A result which relies on a not very > well-known fact, that you can actually

Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-02 Thread Justin Kramer
Nice, Mike. I stole your work and put it into the Wiki I created to see how it fit: http://clojure-examples.appspot.com/clojure.core/reduce (Note: reduce seems to be missing a doc string in 1.2 master; for other functions doc strings show up.) As cool as walton is, it's kind of a firehose. A cur

Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-02 Thread Mike Meyer
On Fri, 2 Jul 2010 14:50:18 -0700 (PDT) Justin Kramer wrote: > Nice, Mike. I stole your work and put it into the Wiki I created to > see how it fit: > > http://clojure-examples.appspot.com/clojure.core/reduce Well, I like it, but I might be a bit biased. I think the important part is the rules

Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-02 Thread Meikel Brandmeyer
Hi, Am 03.07.2010 um 00:37 schrieb Mike Meyer: > Cleaning mine version up and combining them gives: > > * Keep it simple and self contained > - the first example shouldn't require knowing anything but clojure syntax > - the inputs to an example should either be literals or simple expressions >

Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-05 Thread Justin Kramer
I've integrated your suggestions into the wiki's guidelines: http://clojure-examples.appspot.com/guidelines Feel free to add anything else that needs mentioning. There's also a talk page for discussion. Justin On Jul 2, 6:37 pm, Mike Meyer wrote: > On Fri, 2 Jul 2010 14:50:18 -0700 (PDT) > > J