something like %() becomes possible with reader literals in clojure 1.4
Not sure if it is a good idea though also, top level literals are
reserved
On Tue, Jun 19, 2012 at 8:56 PM, Jay Fields j...@jayfields.com wrote:
I'd actually like to see %(...) become (partial ...), as I think
people
On Tue, Jun 19, 2012 at 8:25 PM, JvJ kfjwhee...@gmail.com wrote:
This is not really a big deal, but I was wondering if there was a shorter
alias for partial in the standard library. It seems like one of those
things that should require a single-character operator.
Interesting, I am also
Why it has to be reader macro? I don't see any reason.
среда, 20 июня 2012 г., 0:56:15 UTC+6 пользователь Jay Fields написал:
I'd actually like to see %(...) become (partial ...), as I think
people associate % with anonymous functions. Which is why I chose (%
...), as it's close to what I
Only case I can see where it doesn't work.
user= (def % partial)
#'user/%
user= (map #(% + %) [1 2 3]) ;trying to use #(% + %) instead of #(partial
+ %)
ClassCastException java.lang.Long cannot be cast to clojure.lang.IFn
user/eval2/fn--3 (NO_SOURCE_FILE:2)
; (Also: my first post in this group.
I propose using ☃. I don't think it has any other uses yet. ;)
On Tue, Jun 19, 2012 at 8:57 PM, Joel Ericson kasett...@gmail.com wrote:
Only case I can see where it doesn't work.
user= (def % partial)
#'user/%
user= (map #(% + %) [1 2 3]) ;trying to use #(% + %) instead of #(partial
+ %)
This is not really a big deal, but I was wondering if there was a shorter
alias for partial in the standard library. It seems like one of those
things that should require a single-character operator.
I usually do something like this :
(def $ partial)
I wonder if something like that could be
what if you need the '$' for interop?
Jim
On 19/06/12 19:25, JvJ wrote:
This is not really a big deal, but I was wondering if there was a
shorter alias for partial in the standard library. It seems like one
of those things that should require a single-character operator.
I usually do
I use %, (def % partial)
On Tue, Jun 19, 2012 at 2:28 PM, Jim - FooBar(); jimpil1...@gmail.com wrote:
what if you need the '$' for interop?
Jim
On 19/06/12 19:25, JvJ wrote:
This is not really a big deal, but I was wondering if there was a shorter
alias for partial in the standard
what? is it not a reserved character to denote args in function
literals? I'm confused =-O !
Jim
On 19/06/12 19:29, Jay Fields wrote:
I use %, (def % partial)
On Tue, Jun 19, 2012 at 2:28 PM, Jim - FooBar();jimpil1...@gmail.com wrote:
what if you need the '$' for interop?
Jim
On
I use %, (def % partial)
That works until you try to use the shorthand for anonymous functions:
(map #(inc %) [1 2 3]) ; what's this going to do?
Timothy
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
On 19/06/12 19:32, Timothy Baldridge wrote:
That works until you try to use the shorthand for anonymous functions:
(map #(inc %) [1 2 3]) ; what's this going to do?
Timothy
Thank you! :-)
Jim
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To
uh, it's going to do what you expect...
user= (def % partial)
#'user/%
user= (map #(inc %) [1 2 3])
(2 3 4)
On Tue, Jun 19, 2012 at 2:33 PM, Jim - FooBar(); jimpil1...@gmail.com wrote:
On 19/06/12 19:32, Timothy Baldridge wrote:
That works until you try to use the shorthand for anonymous
uh, it's going to do what you expect...
user= (def % partial)
#'user/%
user= (map #(inc %) [1 2 3])
(2 3 4)
My point was that you have overloaded the meaning of the % symbol. If
someone says what does % mean in clojure. You can say it's
shorthand for the first argument in the shorthand
I'd actually like to see %(...) become (partial ...), as I think
people associate % with anonymous functions. Which is why I chose (%
...), as it's close to what I wish we had.
I get your point though, and I don't disagree. But, this does keep
coming up, so I think a shorter syntax for partial
14 matches
Mail list logo