Let's focus on that for a sec:
(define ((A)) 1) is the same as (define (A) (lambda () 1));;
defines procedure "(A)"
I wonder if you meant >>defines procedure "((A))"<< instead.
Assuming that, if "((A))" is just a name of the procedure, then
"A" and "(A)". Should not evaluate at all. Appa
I use Rocket Scheme. The question was inspired by "Structure and
Interpretation" http://www.youtube.com/watch?v=2Op3QLzMgSY at almost
end of the video @ 1:11:11
I actually think that "((A))" is more just a symbol name since
apparently you define "A" not a "((A))"/ It is more like a
recursive/ne
On Wed, Aug 29, 2012 at 10:14 PM, Baishampayan Ghose wrote:
> Something like this?
>
> (defn A []
> 1)
>
> (defn A []
> (fn [] 1))
That would work but I wonder about how "(define ((A)) 1)" is evaluated
in Scheme and why similar and easier approach is not possible in
Clojure?
--
You received
> (define (A) 1)
#
> A
#
> (A)
1
> (define ((A)) 1)
#
> A
#
> (A)
#
> ((A))
1
Just wondering ...
Andy
--
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 that posts from new members are
I know, but this is list :-)
--
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 that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from th
Hi,
I am looking for two seemingly simple operations which require adding
to the list:
(( 1 2 ) ( 20 30) (40)) 50 => (( 1 2 ) ( 20 30) (40 50))
and
(( 1 2 ) ( 20 30) (40 50)) 60 => (( 1 2 ) ( 20 30) (40 50) (60))
Basically it is appending an element as a list to the list
> Oh, and I also believe training is mostly a waste of resources. Training is
> pushing information.
It really depends how it is constructed. If it is a domain knowledge -
this is just a info push. If this is a skill to be acquired - I have
seen many hands on dedicated labs very effective.
Now
So I followed the steps and it did not work:
> 3) This will automatically create a filter on words:
> list:""
however after changing filter to >>Matches:
to:(clojure.googlegroups.com) Do this: Apply label "clojure"<< all
seems to be just fine and I am a happy camper ...
Thank you,
Andy
--
Yo
Hi,
thx a lot for all viewpoints. I am personally a bit torn. On one
hand, when I open my gmail I have hard time to distinguish between all
groups I am subscribed too. When you get tens of threads updated
daily, this is really handy. However, I hate to have a redundant
information in Subject and
Hi,
I have been subscribed to a couple of groups as well as other stuff
and find it useful to have a Subject line prefix indicating the source
of conversation.
Would it be possible to add something like that [clojure]
Thx,
Andy
--
You received this message because you are subscribed to the Goo
>
> (defn lis [coll]
> (or (->> coll
> (partition-between (partial apply >=))
> (sort-by (comp - count))
> (filter next)
> (first))
> []))
Totally agree on decomposing the problem into a single independent
steps. This is what I did not like about
On Wed, Jun 13, 2012 at 4:05 AM, JuanManuel Gimeno Illa
wrote:
> My solution:
>
> (defn lis [s]
> (->> s
> (partition 2 1)
> (partition-by (partial apply <=))
> (filter (fn [[[a b]]] (< a b)))
> (reduce (fn [m s] (if (> (count s) (count m)) s m)) [])
> (#(cons
forgot full listing:
scala> List[Int](6, 7, 8, 1, 2, 3, 4, 1, 11, 10 ,11 ,12 ,13,
| 3).foldLeft(List[List[Int]]()){(a,b)=>
| if(a.isEmpty) List(List(b))
| else if(a.last.last < b) a.dropRight(1):::List(a.last:+b)
| else a:::List(List(b))
|
}.filter(_.
Nice. But I wonder if sorting and (count coll) actually forces the
algorithm to load everything into memory. My Clojure solution is more
convoluted (will post it later) and suffers the same due to a
recursive algorithm doing the transformation I described at the end.
However I think I have someth
Hi,
First a quick disclaimer. Those are my first steps in Clojure so I am
not be super accustomed to the language entire landscape and might
miss some basics here. However I was able to solve my first 4clojure
hard problem https://www.4clojure.com/problem/53 and have some second
thoughts after loo
thx, I see it now.
--
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 that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group,
Hi,
I am looking for a way to express following function in Clojure:
scala> scanLeft(List(1,2,3))(0)(_ + _)
res1: List[Int] = List(0, 1, 3, 6)
Any insight?
Andy ...
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to
I was wondering cause we can do all awesome stuff like that:
user=> (last "abc")
\c
user=> (first "abc")
\a
user=> (map (fn[z] (str z "-")) "abc")
("a-" "b-" "c-")
but this renders false
user=> (coll? "abc")
false
A.
--
You received this message because you are subscribed to the Google
Groups
Hi,
So my questions is as in subject. I did a bit of research but could not
find a good answer.
Would appreciate an insight ...
(thank you 'Andy)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegro
19 matches
Mail list logo