One clarification that might help is that traditionally the list has
been the only structure in lisps, and other data representations were
faked with lists. Clojure added other modern data structures to that
traditional model (those are what are generally used for "data"
purposes) and left the lis
I think I understand more now though, everyone. Thanks. clojure chose
lists for the data structure for code so lists sort of have a special place
in the language.
Thanks again.
On Fri, Oct 28, 2011 at 1:13 AM, e wrote:
>
>
> On Thu, Oct 27, 2011 at 8:26 PM, Mark Rathwell wrote:
>
>> > Maybe i
On Thu, Oct 27, 2011 at 8:26 PM, Mark Rathwell wrote:
> > Maybe it would be clearer if I proposed some other, lesser-used chars,
> like
> > "%(1 2 3 4)" or even "<1 2 3 4>". That is, I'm not so much saying, "this
> > needs to be treated as data and not eval'd" as I am simply saying, "this
> is
>
On Thu, Oct 27, 2011 at 7:42 PM, Stephen C. Gilardi wrote:
>
> On Oct 26, 2011, at 7:08 PM, e wrote:
>
> > [1 2 3] is a vector that is not evaluated. Since there is no overload
> with things that are, there's no need for a special mark.
>
> If you type [1 2 3] into the REPL it is evaluated. The E
> Maybe it would be clearer if I proposed some other, lesser-used chars, like
> "%(1 2 3 4)" or even "<1 2 3 4>". That is, I'm not so much saying, "this
> needs to be treated as data and not eval'd" as I am simply saying, "this is
> the 'list' data structure as opposed to some other".
A list data
On Oct 26, 2011, at 7:08 PM, e wrote:
> [1 2 3] is a vector that is not evaluated. Since there is no overload with
> things that are, there's no need for a special mark.
If you type [1 2 3] into the REPL it is evaluated. The E part of the REPL
always runs. Some expressions evaluate to themsel
You can also use the list function if you don't care about syntactic sugar,
and it seems. Like it should look like this:
=> (list 1 2 3 4)
'(1 2 3 4)
or
<1 2 3 4> <-- although i'd use that for vectors and use [] for lists.
Wouldn't that be cool?
I imagine (set 1 2 3 4) prints as #{1 2 3 4}
On Oc
On Oct 26, 2011 7:15 PM, "Stuart Halloway"
wrote:
>>
>> checking out the "Try Clojure":
>>
>> if you type the following, you get output that matches what you typed
>> in every case except for lists.
>>
>> Vectors: --> [1 2 3 4]
>> [1 2 3 4]
>>
>> Maps: --> {:foo "bar" 3 4}
>> {:foo "bar" 3 4}
>>
>
Hi!
Well [1 2 3] is just a syntaxic sugar for (vector 1 2 3):
=>(vector 1 2 3)
[1 2 3]
When you enter a vector in the repl, it is evaluted to itself. Here an
example that show it:
=>[1 2 (+ 1 2)]
[1 2 3]
And you can use the vector function for the same result:
=>(vector 1 2 (+ 1 2))
[1 2 3]
The
More reasonable..
On Oct 27, 7:15 am, Stuart Halloway wrote:
> > checking out the "Try Clojure":
>
> > if you type the following, you get output that matches what you typed
> > in every case except for lists.
>
> > Vectors: --> [1 2 3 4]
> > [1 2 3 4]
>
> > Maps: --> {:foo "bar" 3 4}
> > {:foo "b
> '(1 2 3) is a list that is not evaluated. No loss of generality. it's a
> special type of list. One that's not evaluated. as opposed to a special
> indicator to the repl.
That would essentially be a new data structure, filling a role mostly
already filled by vectors. And you would still nee
> checking out the "Try Clojure":
>
> if you type the following, you get output that matches what you typed
> in every case except for lists.
>
> Vectors: --> [1 2 3 4]
> [1 2 3 4]
>
> Maps: --> {:foo "bar" 3 4}
> {:foo "bar" 3 4}
>
> Lists: --> '(1 2 3 4)
> (1 2 3 4) <- *INCONSISTENT* why
not necessarily.
[1 2 3] is a vector that is not evaluated. Since there is no overload with
things that are, there's no need for a special mark.
'(1 2 3) is currently a way of say, "don't evaluate this list", but it could
have been:
'(1 2 3) is a list that is not evaluated. No loss of generali
The point to think about here is that functions are also lists, the
same as your list of integers. The difference is that one is
evaluated, the other is not. That is what the quote is saying: "don't
evaluate me". The quote is not actually a part of the list. It's just
the way you tell the reader
long long time since I last looked a clojure, but I've never lost
interest and I'm trying to find the time again.
for the short version see "*INCONSISTENT*", in the example at the end.
I know what the answer will be here. Something like "you will get
used to it". or "it's not important". or "no
15 matches
Mail list logo