Nп/п : 50 из 93
 От   : none) (albert                       2:5075/128        31 авг 23 11:11:14
 К    : All                                                   31 авг 23 12:13:03
 Тема : What does (gensym) generate?
----------------------------------------------------------------------------------
                                                                                 
@MSGID:
9920c478
@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
The explanations about the usage of gensym are clear,
how your are supposed to used them.
The theoretical background however is far from it.

(let* (aaa (gensym)) .. aaa  .. )

In the context `` .. aaa .. `` `aaa is obviously a symbol.
The interesting question is what value is aaa coupled to due to
the environment (aaa (gensym))?
Apparently aaa must be evaluated before it is any use.
However subsequently you see
(let*   (aaa (rest whatever)) ... )
What is disturbing to me is that let* only allows symbols into the
position of aaa and normally the coupling of aaa hides previous usage.
I have the following lisp type of objects:
    symbols lists numbers strings arrays hashes normal-function
    special-functions booleans
and more MAL oddballs:
    nil key atom

Nothing seems an appropriate type for `aaa.

Example studied:

(defmacro! or
  (fn* (& xs)
    (if (empty? xs)
      nil
      (if (= 1 (count xs))
        (first xs)
        (let* (condvar (gensym))
          `(let* (~condvar ~(first xs))
             (if ~condvar ~condvar (or ~@(rest xs)))))))))

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 -
-- 
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    
                                                                                
В этой области больше нет сообщений.

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