Re: [PATCH] Getting substrings counting from the end

2009-03-01 Thread Phil Hagelberg
Michael Wood writes: > Makes sense to me, but there's a bug in your function. You want (< % > 0) instead of (< 0 %). Quite right; good catch. thanks, Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure

Re: [PATCH] Getting substrings counting from the end

2009-03-01 Thread Michael Wood
On Sun, Mar 1, 2009 at 10:13 PM, Phil Hagelberg wrote: > > Phil Hagelberg writes: > >> It's a pretty common idiom in other languages for substring functions >> to count from the end if given a negative index. >> >>   (substring "hello world!" 6 -1) ;; => "world" >> >> I'd be glad if Clojure's "s

Re: [PATCH] Getting substrings counting from the end

2009-03-01 Thread Mark Volkmann
On Sun, Mar 1, 2009 at 2:13 PM, Phil Hagelberg wrote: > > Phil Hagelberg writes: > >> It's a pretty common idiom in other languages for substring functions >> to count from the end if given a negative index. >> >>   (substring "hello world!" 6 -1) ;; => "world" >> >> I'd be glad if Clojure's "su

[PATCH] Getting substrings counting from the end

2009-03-01 Thread Phil Hagelberg
Phil Hagelberg writes: > It's a pretty common idiom in other languages for substring functions > to count from the end if given a negative index. > > (substring "hello world!" 6 -1) ;; => "world" > > I'd be glad if Clojure's "subs" function could work like this. Should > I create an issue and