Hi :)
I really want to know if there is a way to do this:
(ns ...
(:import [java.util Calendar]))
(defsomething ;; if it is possible using a macro I'm ok with that
calendar-member
[member]
(symbol (str "Calendar/" member)))
what I want to know if an instance of Calendar "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?
btw I'm really loving the language.
--
Daniel Meneses Báez
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.