Hi everyone,
What are your opinions on adding a special metadata to functions to provide
it in scope for tests? This would be a nice language feature to have:
For example,
(ns banana)
(defn- ^:+test phone [] "ring ring ring")
(ns banana-test
...)
(deftest ring-ring []
; We can call the
Is there something like JSON Schema http://json-schema.org/examples.html
specifically for Transit? Perhaps with a validator tool too.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note t
Private functions (really vars marked private holding a function) can
always be accessed via the var #' syntax:
(ns banana-test
...)
(deftest ring-ring []
(is (sting? (#'banana/phone)))
This is the way private functions are typically tested.
On Wednesday, March 23, 2016 at 6:53:12 AM UT
I guess the other important detail there is that when you invoke a var
holding a function, it invokes the function.
On Wednesday, March 23, 2016 at 7:01:41 AM UTC-5, Alex Miller wrote:
>
> Private functions (really vars marked private holding a function) can
> always be accessed via the var #' s
Thanks Alex, that's very helpful.
-- Ryan
On Wednesday, March 23, 2016 at 5:02:43 AM UTC-7, Alex Miller wrote:
>
> I guess the other important detail there is that when you invoke a var
> holding a function, it invokes the function.
>
> On Wednesday, March 23, 2016 at 7:01:41 AM UTC-5, Alex Mill
I am just using the math combinatorics library and spent some time
debugging until I found out that combinations does not accept n=1. Is this
intentional?
*=> (clojure.math.combinatorics/combinations #{1 2 3 4} 1)*
*UnsupportedOperationException nth not supported on this type:
Persistent
The input should be a sequence not a set, so call seq on the input before
passing it to this function.
Sorry if that was unclear from the docs. (For some inputs, it is more
forgiving, but when you call combinations with n=1, it calls distinct on
the set, and clojure.core's implementation of disti
Thanks, this helps!
Generally, is there any reason why combinations should not work on sets? I
may have tunnel vision here as they are everywhere in the systems I build.
On Wednesday, March 23, 2016 at 7:54:05 PM UTC-4, puzzler wrote:
>
> The input should be a sequence not a set, so call seq
On Wed, Mar 23, 2016 at 7:05 PM, Matthias Grabmair <
matthias.grabm...@gmail.com> wrote:
>
> Thanks, this helps!
>
> Generally, is there any reason why combinations should not work on sets? I
> may have tunnel vision here as they are everywhere in the systems I build.
>
>
A lot of the functions pr
// , What ended up happening with this?
My company and I could really use a full featured blogging engine in
Clojure.
https://groups.google.com/forum/#!topic/clojure/rCmPYa0Vw-4
On Thursday, July 18, 2013 at 7:24:06 AM UTC-7, frye wrote:
>
> Hello,
>
> I'm thinking of how to build a composa
10 matches
Mail list logo