Dear Clojurians,
a new version of VimClojure is available. I tried to fix also the string
handling for the indenting. This should work now. Please note that there
is still some issue with a line ending in a comment containing a (. I'm
not sure how to fix this.
New in this release:
- I further r
Thanks!
Your #2 solution is a bit cleaner than what I had in mind
For #4 I was able to use the standard form [& b] in defn without any
issues. I could of *sworn* that didn't work before whenever I tried it
with just one argument, but clearly I was *insane*.
Thanks again for input
--n
--~--~--
Well, I just find out there was an obvious bug in the code I posted
previously. Here's the correct expand-parser-body:
(defn- expand-parser-body [body s]
(let [rec (fn [r p xs]
`(let [~r (~p ~s) ~s (second (first ~r))]
(if (= 0 (count ~r)) ~r
Thank you very much! Your trick worked and it even made me realize
that the match-forms function is not even required. I've replaced it
by a much more simple is-match? function and completely overhauled the
match macro.
Here's the new code with your corrections, some other improvements and
an exa
On Fri, Aug 29, 2008 at 3:41 PM, Graham Fawcett
<[EMAIL PROTECTED]> wrote:
> Appending to a list is kludgey in general. Clojure's PersistentLists
> are singly-linked lists (like Lisp's cons cells), and appending onto
> their tails is O(n) because the entire list must be traversed to find
> the tai
On Fri, Aug 29, 2008 at 2:29 PM, noahr <[EMAIL PROTECTED]> wrote:
>
> 1) What's a good way to add to the end of a list?
>
> You could reverse it then cons then reverse it again
> You could convert to vector and use (conj.. or some such
>
> Both of the above seem very kludgey
Hi,
Appending to a l
> 4) Is there not a way to define a function with one argument, and have
> that argument be optional? or have only optional arguments?
; all args optional
(defn arg-count [& args] (count args))
; custom handling for different arg counts
(defn arg-opinion
([] "that will be easy to test!")
(
> 2) Whats a good way to add some items into the middle of a list
>
> You could split-at then pick out the results and use concat with new
> items in-between
> Again, java add index not supported
Is this what you had in mind?
(defn add-in-the-middle [src middle-pos items]
(concat (take middle
1) What's a good way to add to the end of a list?
You could reverse it then cons then reverse it again
You could convert to vector and use (conj.. or some such
Both of the above seem very kludgey
Java .add is not available
I did find however, you can form a 1-element list from the item and
conc
On Aug 28, 7:40 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> I'm pleased to announce that Stephen C. Gilardi's lib code has been
> integrated into the clojure namespace and is included in boot.clj, as
> of SVN rev 1009.
>
> This means that use, require, and load-resources are now available by
> de
On Aug 28, 7:40 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> I'm pleased to announce that Stephen C. Gilardi's lib code has been
> integrated into the clojure namespace and is included in boot.clj, as
> of SVN rev 1009.
>
> This means that use, require, and load-resources are now available by
>
11 matches
Mail list logo