gensym Questions

3

Solved

In Clojure, you need to use gensym to create symbols for internal use in your macros to keep them hygienic. However, sometimes you need to use the same symbol in nested syntax-quotes. For example, ...
Librettist asked 1/10, 2012 at 15:40

4

I heard some of my classmates talking about how they used the function gensym for that, I asked them what it did and even checked up online but I literally can't understand what this function does ...
Intercessory asked 26/12, 2019 at 20:10

1

Solved

I'm using Gensim Doc2Vec model, trying to cluster portions of a customer support conversations. My goal is to give the support team an auto response suggestions. Figure 1: shows a sample conversat...
Cora asked 14/9, 2016 at 12:0

2

I want to test a macro that uses gensyms. For example, if I want to test this: (defmacro m1 [x f] `(let [x# ~x] (~f x#))) I can use macro-expansion... (macroexpand-1 '(m1 2 inc)) ...to get...
Atwekk asked 25/5, 2013 at 0:1

2

Solved

There is something I can't understand about Common lisp. Assume I'm writing a macro similar to this: (defmacro test-macro () (let ((result (gensym))) `(let ((,result 1)) (print (incf ,result...
Glycosuria asked 21/12, 2012 at 9:1

2

Solved

I'm reading/working through Practical Common Lisp. I'm on the chapter about building a test framework in Lisp. I have the function "test-+" implemented as below, and it works: (defun test-+ () (...
Damara asked 29/9, 2012 at 23:43
1

© 2022 - 2024 — McMap. All rights reserved.