Nп/п : 85 из 93
От : none) (albert 2:5075/128 22 сен 23 10:39:40
К : none) (albert 22 сен 23 11:43:05
Тема : Re: Understanding apply in MAL (clojure dialect)
----------------------------------------------------------------------------------
@MSGID:
b09911d3
@REPLY:
fe9d7b71
@REPLYADDR none) (albert
@REPLYTO 2:5075/128 none) (albert
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
@RFC-Message-ID:
@TZUTC: 0200
@TID: FIDOGATE-5.12-ge4e8b94
In article
,
none) (albert wrote:
>Implementing mal according to https://github.com/kanaka/mal
>I have problems with the implementation of apply.
>
>(apply symbol? (list two) )
>should give true, but this test fails.
Sorry I have goofed.
The test in mal is actually,
(apply symbol? (list (quote two)) )
Kaz noticed that in his last line.
My conclusion is that `apply` is not a normal function but special.
It follows its own rules whether things should be evaluated.
The problem is that the last parameters is a list, and
I cannot pass a list without involking the (list..) construction
In my book that is an evaluation of the list procedure called
#2189218 whatever. So the second parameter is to be evaluated.
What I understand is that `symbol? has a bald underlying procedure.
`apply takes care that this procedure is called with the elements
of list.
>Groetjes Albert
--
Don`t praise the day before the evening. One swallow doesn`t make spring.
You must not say "hey" before you have crossed the bridge. Don`t sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -
--- trn 4.0-test77 (Sep 1, 2010)
* Origin: KPN B.V. (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441