How does one recognize a relational or non-relational goal?
Thanks for the fd example.
On Sunday, June 30, 2013 7:34:58 PM UTC+2, Norman Richards wrote:
>
> What you are trying to do is non-relational, and will only work when you
> put the non-relational pluso at the end.
>
> You can obviously
I wrote this goal:
(use 'clojure.core.logic)
(use 'clojure.core.logic.protocols)
(defn pluso [t1 t2 s]
(fn goal [a]
(let [args (map (partial walk a) [t1 t2 s])
fresh? (map lvar? args)
ground? (map not fresh?)
[t1 t2 s] args]
(cond
(= [true true
Given two byte arrays that have the same content (value) the code
below runs without errors:
(def ba1 (...))
(def ba2 (...))
(assert (not= ba1 ba2))
(assert (= (String. ba1) (String ba2)))
Is this as expected?
--
You received this message because you are subscribed to the Google
Groups "Clojur
On 8 jun, 19:43, ataggart wrote:
> On Jun 8, 6:33 am, Steven Devijver wrote:
>
> > On 8 jun, 05:47, Daniel wrote:
>
> > > These notation arguments are compelling.
>
> > I'm not convinced. The notation would only work for literals
>
> Correct.
>
On 8 jun, 16:38, Mike Meyer wrote:
>
> Why? It isn't supported for rationals or exponents. Or are you
> claiming that because we support "3/4" we should also support
>
> (* (my-complicated-algo val)/(my-other-complicated-algo exp)
> 1/(another-complicated-algo exp2))
>
> with similar problems
On 8 jun, 05:47, Daniel wrote:
> These notation arguments are compelling.
>
I'm not convinced. The notation would only work for literals, and how
often would one write literal complex numbers?
For non-literals the notation would need to support this:
(* (my-complicated-algo x)+(my-other-compl
For what it's worth, I found that working with complex numbers in
clojure doesn't require specialist types or notation at all:
(defn complex-times [[a_re a_im] [b_re b_im]] [(- (* a_re b_re) (*
a_im b_im)) (+ (* a_re b_im) (* a_im b_re))])
(defn complex-plus [[a_re a_im] [b_re b_im]] [(+ a_re b_r
On 17 mei, 19:25, "Eric Schulte" wrote:
> Hi Steven,
>
> I recently put together a propagator/cell system using Clojure's
> actors/watchers. The code for implementing a concurrent propagator
> system actually came out to a little less than a single page. Take a
> look at the following for the
On 17 mei, 08:48, Fabio Kaminski wrote:
> first that dinamic languages are better for developers, but you loose some
> performance compared to typed languages.. and jvm was created with types in
> mind.. so right now clojure data structures are implemented in java and
> typed, when you get it in
I'm experimenting with cells in clojure and am currently using the
"lazy" branch for this. However, I'm getting some strange behavior.
So my question is: which branch should I be using if I want to test-
drive the watcher feature?
Thanks
--
You received this message because you are subscribed t
Hey,
I have this multi-method setup:
(defmulti dsl-walk :Rule)
(defmulti component-constructor :Component)
(defmethod dsl-walk :SymbolPlus [r]
(let [children (map dsl-walk (:recurrent r))]
(apply component-constructor (list {:Component (keyword (:symbol
r)) :children chi
On 29 mrt, 09:43, Jarkko Oranen wrote:
> Interfaces are good, but defining your own is mainly reserved for Java
> interop. You should strive to use plain old untyped data structures
> for your data, ie. just put things in maps, vectors, sets andl lists.
> Write (pure) functions to transform the
be living in a
different world if I would just implement my functions and pass those
functions around as function arguments without using Java interfaces
and gen-class?
Thanks
Steven Devijver
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
T
13 matches
Mail list logo