Re: Kwargs vs explicit parameter map for APIs?

2015-04-05 Thread n aipmoro
In the blog post, tcrayford gives an example of the difficulties in wrapping a kwargs function: (defn my-wrapper [& kwargs] (let [options (assoc (apply hash-map kwargs) :my-default-arg 1)] (apply (your-api-fn (flatten (into '() options)) Sure, that's convoluted (and I couldn't actually

Re: Kwargs vs explicit parameter map for APIs?

2015-04-05 Thread n aipmoro
That explains it. In the type of stuff I write, that possibility wouldn't arise: there is no calling code that I can't control, and I definitely want the ability to change my wrapper's default. In any case, I realized the reason your blog code didn't run was an error: you need to change (apply (yo

cloure-mode indenting (or not)

2013-10-11 Thread n aipmoro
Hi, I'm on emacs/ubuntu, been coding clojure for 2 years w/clojure-mode, nrepl, and the starter-kits. Nice environment! Was away from clojure for a few months while I worked on python stuff. Admittedly, during that time I probably updated various clojure-related packages without checking their effe

Re: cloure-mode indenting (or not)

2013-10-11 Thread n aipmoro
Thanks for that. But that conversation was more than a year ago and I know that auto-indent was working just a few months ago. Of course, maybe I hadn't updated clojure-mode for a year. Unlikely but possible. regards, naipmoro On Fri, Oct 11, 2013 at 6:07 PM, George Oliver wrote: > > > On Frida

Re: cloure-mode indenting (or not)

2013-10-11 Thread n aipmoro
7; instead of > `newline-and-indent' when paredit is enabled. Try both and see which > works better :-) > > On Sat, Oct 12, 2013 at 12:40 AM, Moritz Ulrich > wrote: > > On Fri, Oct 11, 2013 at 11:33 PM, n aipmoro wrote: > >> I have to hit the TAB key after ENTER

Re: cider status

2013-12-16 Thread n aipmoro
On Mon, Dec 16, 2013 at 12:27 PM, Gary Johnson wrote: > It took me maybe an hour of reading the website docs, > installing/uninstalling packages with package.el, and updating the relevant > sections of my .emacs.d/init.el file. Not to poo-poo on anyone's parade, > but it really did seem pretty s

Re: closure example doesn't need let?

2012-05-14 Thread n aipmoro
hi, Just a couple of paragraphs further on in the book (p. 137): "In our definition of times-n, we created a local x using let and closed over that instead of closing over the argument n directly. But this was only to help focus the discussion on other parts of the function. In fact, closures clos