sketerpot comments on Open Thread: July 2010, Part 2 - Less Wrong

6 Post author: Alicorn 09 July 2010 06:54AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (770)

You are viewing a single comment's thread. Show more comments above.

Comment author: sketerpot 13 July 2010 05:40:21AM 0 points [-]

While we're sharing fun information, I'd like to point out a little-used feature of Markdown syntax: if you put four spaces before a line, it's treated as code. Behold:

(define (make-counter)
(let ([internal-variable 0])
(lambda ()
(begin (set! internal-variable (+ internal-variable 1))
internal-variable))))

Also, the emacs rectangle editing functions are good for this. C-x r t is a godsend.