jvanderhyde jamesvh...@hotmail.com writes:
Thanks for the help, everyone. You managed to pin down my problem. I was
using Clojure from the ground up and a Scheme book, and the two together
got me confused. So, I can say it like this:
Every expression is evaluated (meaning converted to a
jvanderhyde jamesvh...@hotmail.com writes:
Another random thought: What to you call this?
[(+ 2 3) (+ 4 5)]
It is an expression, but it is not a literal--I cannot say it evaluates to
itself.
So, only symbols and keywords really evaluate to themselves. All you are
showing is that vectors
That's a neat trick!
--
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,
http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome.
Kyle Kingsbury's Clojure from the ground up has an excellent introduction about
symbols, vars and quoting where he introduces them in the beginning of the
course which makes things pretty clear and which makes the steo up to macro's
jvanderhyde jamesvh...@hotmail.com writes:
I want to say something like this:
A word is considered a var unless it is quoted. Example: 'hello
A list is considered a function invocation unless it is quoted. Example:
'(1 2 3)
I think you really need to bite the bullet and say everything
+1 on this. I was really (pleasantly) surprised by this approach.
On Friday, September 12, 2014 4:58:45 AM UTC-4, Niels van Klaveren wrote:
http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome.
Kyle Kingsbury's Clojure from the ground up has an excellent introduction
about symbols,
Thanks for the help, everyone. You managed to pin down my problem. I was
using Clojure from the ground up and a Scheme book, and the two together
got me confused. So, I can say it like this:
Every expression is evaluated (meaning converted to a value), unless it is
quoted.
Every expression
Another random thought: What to you call this?
[(+ 2 3) (+ 4 5)]
It is an expression, but it is not a literal--I cannot say it evaluates to
itself.
Sorry if I'm being pedantic. Maybe it doesn't matter. Terminology is
important, though, when I'm trying to teach.
--
You received this message
Relating to your random thought, note that:
= '[(+ 2 3) (+ 4 5)]
[(+ 2 3) (+ 4 5)]
Probably the only way to make sense out of this is to talk about how every
expression is first read then evaluated.
You can interactively explore how things are read in Clojure with
read-string.
= (read-string (a
On Sep 12, 2014, at 2:36 PM, Mark Engelberg mark.engelb...@gmail.com wrote:
As far as I know, Clojure doesn't give you a whole lot of control over how
things print at the REPL
The built-in clojure repl has some customization options. You can run a repl
with a custom reader and printer, for
I'm new to Clojure, but I'm teaching a course on it this year to
undergrads. I'm having a little trouble with terminology, partly because
Clojure departs from other languages (such as Scheme) on some terms (such
as atom).
I want to say something like this:
A word is considered a var unless it
I'm having some trouble fleshing out the surrounding context, but I'll take
a stab at this:
I don't think word is the correct term to use. Do I mean symbol?
Token, perhaps?
Do I mean symbol instead of var?
Yes. It may not be a var, after all.
Is list better called a form or an s-expression?
Thank you for the help.
What is the difference between a form and an s-expression? The Clojure
Glossary
https://github.com/clojuredocs/guides/blob/master/articles/language/glossary.md
defines
form as a valid s-expression. What is an example of an invalid
s-expression?
I'm not sure token is
On Thursday, September 11, 2014 2:49:43 PM UTC-5, jvanderhyde wrote:
I'm new to Clojure, but I'm teaching a course on it this year to
undergrads. I'm having a little trouble with terminology, partly because
Clojure departs from other languages (such as Scheme) on some terms (such
as
This whole discussion makes me think you're trying to teach Clojure in a
Scheme-like way, which maybe isn't the best approach.
In Clojure, it is rare to need quoted lists and symbols.
Instead of 'hello, you would use :hello.
Instead of '(1 2 3), you would use [1 2 3].
So the whole notion of
15 matches
Mail list logo