Questions tagged [quote]

The Lisp quote is a special operator that returns its only argument, unevaluated.

The Lisp quote is a special operator that returns its only argument, unevaluated.

638 questions
133
votes
10 answers

When to use ' (or quote) in Lisp?

After making it through the major parts of an introductory Lisp book, I still couldn't understand what the special operator (quote) (or equivalent ') function does, yet this has been all over Lisp code that I've seen. What does it do?
Cristián Romo
  • 9,814
  • 12
  • 50
  • 50
132
votes
8 answers

How to escape single quote in sed?

How to escape a single quote in a sed expression that is already surrounded by quotes? For example: sed 's/ones/one's/' <<< 'ones thing'
Thomas Bratt
  • 48,038
  • 36
  • 121
  • 139
68
votes
7 answers

What is ' (apostrophe) in Lisp / Scheme?

I am on day 1 hour 1 of teaching myself Scheme. Needless to say, I don't understand anything. So I'm reading The Little Schemer and using this thing: http://sisc-scheme.org/sisc-online.php as an interpreter. I need to use ' in for example (atom?…
jjerms
  • 1,095
  • 1
  • 10
  • 10
62
votes
2 answers

What is the difference between quote and list?

I know that you can use ' (aka quote) to create a list, and I use this all the time, like this: > (car '(1 2 3)) 1 But it doesn’t always work like I’d expect. For example, I tried to create a list of functions, like this, but it didn’t work: >…
Alexis King
  • 43,109
  • 15
  • 131
  • 205
59
votes
6 answers

HTML5 block-quote with author

Hi I'm seeing a great number of different ways to implementat blockquote in html but it doesn't seem clear in its documentation how should I properly format a blockquote let's say of a famous quote and metion its author like: In victory, you…
zanona
  • 12,345
  • 25
  • 86
  • 141
45
votes
7 answers

Single quote escape in JavaScript function parameters

I need to escape single quotes in JavaScript function parameters to avoid this: onclick="Javascript:INSERT_PRODUCT('188267','WILL AND GRACE','32311','L'ANNIVERSARIO DINOZZE ','20101113|04|18|','13/11/2010 0.00.00','CANALE 5 ',this);" But I need to…
Daniele Di Punzio
  • 503
  • 2
  • 5
  • 7
37
votes
2 answers

Make big quotes with

Some years ago, I used the tag to create a quote on my site (with big quotation marks). Now I want to do the same thing, but it doesn't work anymore. The only thing I get are small "" and not the big ones. How do I get the old, big ones…
Matt
  • 1,893
  • 11
  • 33
  • 57
33
votes
4 answers

In Lisp (Clojure, Emacs Lisp), what is the difference between list and quote?

From reading introductory material on Lisp, I now consider the following to be identical: (list 1 2 3) '(1 2 3) However, judging from problems I face when using the quoted form in both Clojure and Emacs Lisp, they are not the same. Can you tell me…
neo
  • 333
  • 3
  • 4
33
votes
7 answers

What is the difference between 1 and '1 in Lisp?

I had never really thought about whether a symbol could be a number in Lisp, so I played around with it today: > '1 1 > (+ '1 '1) 2 > (+ '1 1) 2 > (define a '1) > (+ a 1) 2 The above code is scheme, but it seems to be roughly the same in Common…
Jason Baker
  • 192,085
  • 135
  • 376
  • 510
31
votes
4 answers

Triple-double quote v.s. Double quote

What is the preferred way to write Python doc string? """ or " In the book Dive Into Python, the author provides the following example: def buildConnectionString(params): """Build a connection string from a dictionary of parameters. …
Mingyu
  • 31,751
  • 14
  • 55
  • 60
29
votes
4 answers

Printing " (double quote) in GoLang

I am writing a Go code which reads from a file. To do so I use fmt.Println() to print into that intermediate file. How can I print "?
bender
  • 369
  • 1
  • 4
  • 9
26
votes
4 answers

Nesting with three levels of quotations

I am trying to create a php variable that has three levels of nested quotes. How do I make a third level around "tackEvent", "downloads", "all", and "nofilter"? The double quotes that I have there are not working. $outputList .= "
JSW189
  • 6,267
  • 11
  • 44
  • 72
22
votes
1 answer

In Clojure, difference between function, quoted function and sharp-quote function

In clojure, I'd like to know what are the differences between the three below. (println (map + '(1 2 3) '(4 5 6))) (println (map '+ '(1 2 3) '(4 5 6))) (println (map #'+ '(1 2 3) '(4 5 6))) The results are (5 7 9) (4 5 6) (5 7 9) I can't…
jolly-san
  • 2,047
  • 2
  • 14
  • 9
20
votes
4 answers

The correct COPY command to load postgreSQL data from csv file that has single-quoted data?

I have csv file that has contents like this: 10,53073,0,0,'Y','2008-05-30 21:46:55',0,'2008-05-30 21:48:04',0,53071,2 I want to load the csv data into my_table. CREATE TABLE my_table ( ad_tree_id numeric(10,0) NOT NULL, node_id numeric(10,0)…
null
  • 8,669
  • 16
  • 68
  • 98
17
votes
1 answer

Clojure - difference between quote and syntax quote

(def x 1) user=> '`~x x user=> `'~x (quote 1) Can anyone explain please how it is evaluated step by step?
Alonzorz
  • 2,113
  • 4
  • 18
  • 21
1
2 3
42 43