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.

608 questions
121
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,206
  • 12
  • 46
  • 50
96
votes
9 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
  • 40,822
  • 34
  • 113
  • 133
63
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,035
  • 1
  • 9
  • 10
59
votes
8 answers

How can I write two separate blockquotes in sequence using markdown?

I need to place two blockquotes in sequence, however markdown combines them into a single blockquote. The only way I can get them to separate is placing some junk text between them. As this textfield allows me to use Markdown I can demonstrate: >…
Undistraction
  • 38,727
  • 46
  • 165
  • 296
53
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
  • 40,717
  • 14
  • 119
  • 194
44
votes
6 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
  • 493
  • 2
  • 5
  • 7
44
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
  • 11,379
  • 24
  • 78
  • 137
35
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,795
  • 10
  • 29
  • 55
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
  • 171,942
  • 122
  • 354
  • 501
31
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
  • 313
  • 3
  • 4
27
votes
3 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
  • 26,145
  • 13
  • 50
  • 58
24
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
  • 305
  • 1
  • 3
  • 9
23
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
  • 5,931
  • 10
  • 39
  • 70
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
  • 1,977
  • 2
  • 13
  • 9
16
votes
3 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
  • 7,598
  • 14
  • 55
  • 94
1
2 3
40 41