Nп/п : 25 из 93
 От   : none) (albert                       2:5075/128        04 авг 23 13:48:22
 К    : All                                                   04 авг 23 14:54:07
 Тема : Struggling with quasiquote in MAL
----------------------------------------------------------------------------------
                                                                                 
@MSGID:
2b504478
@REPLYADDR none) (albert
@REPLYTO 2:5075/128 none) (albert
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID:

@TZUTC: 0200
@TID: FIDOGATE-5.12-ge4e8b94
I`m busy with mal
https://github.com/kanaka/mal
a dialect of lisp similar to lisp.

Most types of objects evaluate to herself. number strings.
quotation is necessary for lisp insists that the first item
of a list is a function. All exceptions must be quoted.

Suppose we adapt the rule, that we leave lists alone unless the
first item is a function or a symbol that points to a function.

The expansion of quasiquote / splice-unquote / unquote
suddenly becomes easy in this context.
Switch to an environment where only quasiquote / splice-unquote / unquote
are known. Evaluate. Then continue with the real evaluate.

(quasiquote 1 "A" ( 1 2 3) unquote(a) b ) is to expand to
(cons 1 (cons "A" (cons (1 2 3) (cons (eval a) ( cons b () ) )..)
as a first step, contrary to a tricky choice of possibilities.

There is a hidden quotation in cons.
I find that disenginuous.

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



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх