Thank-you Sean for your answers,
I got the example to work and your explanations certainly helped clarify
the problem. And it definitely improved my understanding of Clojure.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, se
On Jul 31, 2014, at 7:19 PM, Flea Wong wrote:
> (ns crecords.trec
> (:require [crecords.tproc :refer [Fruit]]))
You'll need to :refer subtotal here as well:
(ns crecords.trec
(:require [crecords.tproc :refer [Fruit]]))
Then this will work:
(defn f1 []
(println "Banana Subtotal:" (subtota
On Friday, August 1, 2014 5:32:15 PM UTC+8, Tassilo Horn wrote:
>
> Flea Wong > writes:
>
> Hi!
>
> I'll take the third question first:
>
> > 3. Why the different function call "subtotal" (*without* Dot, see
> > Apple) vs ".subtotal" (*with* Dot, see Orange) for extend-type vs
> > inline im
Flea Wong writes:
Hi!
I'll take the third question first:
> 3. Why the different function call "subtotal" (*without* Dot, see
> Apple) vs ".subtotal" (*with* Dot, see Orange) for extend-type vs
> inline implementation of Fruit?
You should always use (subtotal fruit). That with an inline
impl
i'm a clojure newbie and am pretty thoroughly confused by defprotocol,
inline implementation and extend-type
i have the following two small files: crecords.tproc & crecrods.trec listed
below:
*A) crecords.tproc:*
(ns crecords.tproc)
(defprotocol Fruit (subtotal [this]))
(defrecord Oran