Re: Doubt about "Destructuring rest sequences as map key/value pairs"

2013-09-29 Thread Daniel Meneses
thanks !! On Saturday, September 28, 2013 9:57:13 PM UTC-3, Ambrose Bonnaire-Sergeant wrote: > > The or syntax should be {lastname "Meneses"} > > Thanks, > Ambrose > > > On Sun, Sep 29, 2013 at 8:54 AM, Daniel Meneses Báez > > > wrote: > >

Doubt about "Destructuring rest sequences as map key/value pairs"

2013-09-28 Thread Daniel Meneses Báez
I think that the second and third lines in the following example should yield the same output... *user=> (defn my-name [& {:keys [name lastname] :or {:lastname "Meneses"}}] (str name " " lastname))* *#'user/my-name* *user=> (my-name :name "Daniel" :

Re: calling java static member using string?

2013-08-14 Thread Daniel Meneses Báez
> user=> > > You don't need to use all the Java interop syntax you're using, you can > refer to and compare these static fields directly. In the end these are > simply Integer comparisons. > > DD > > (2013/08/14 11:45), Daniel Meneses Báez wrote: > >

Re: calling java static member using string?

2013-08-14 Thread Daniel Meneses Báez
dnesday (Calendar/getInstance)) true cool xD On Wed, Aug 14, 2013 at 11:33 AM, Jim - FooBar(); wrote: > why on earth is this a macro and not a regular fn? > > > Jim > > On 14/08/13 16:19, Daniel Meneses wrote: > > Hi! > > Thanks for your answer Sean I got it sol

Re: calling java static member using string?

2013-08-14 Thread Daniel Meneses
; (p/monday? (local/local-now)) ;; false > (p/tuesday? (local/local-now)) ;; true (for me) > (p/wednesday? (local/local-now)) ;; false (not yet in California) > > Sean > > On Tue, Aug 13, 2013 at 3:14 PM, Daniel Meneses Báez > > > wrote: > > Hi :) > >

Re: calling java static member using string?

2013-08-13 Thread Daniel Meneses Báez
t] `(= (.get ~instant Calendar/DAY_OF_WEEK) (. Calendar (symbol ~s #'user/is user> (is "TUESDAY" (Calendar/getInstance)) CompilerException java.lang.IllegalArgumentException: No matching method: symbol, compiling:(NO_SOURCE_PATH:1:1) user> isn't working

calling java static member using string?

2013-08-13 Thread Daniel Meneses Báez
endar "isMonday", "isFriday" "isSunday" etc... so I was thinking to write something like (defn- isss [day instant] (= (.get instant Calendar/DATE) (calendar-member day))) and then use it like (def is-friday (partial isss 'FRIDAY)) ;; am I being to crazy?