This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build-in "display" $-3> | |
<build-in "+" $-7> | |
func #22 { | |
$-4 <- getupval 1 | |
$-5 <- getupval 0 | |
$-6 <- getarg 0 | |
$23 <- deref $-4 | |
$24 <- deref $-5 | |
$16 <- funcall 3 $-7 $23 $24 $-6 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$-1 "x" | |
$-2 "y" | |
$-3 "f" | |
$-4 "display" | |
$-5 "+" | |
$-6 "foldl" | |
$-7 "acc" | |
$-8 "v" | |
$-9 "eqv?" | |
$-10 "car" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def f1(): | |
x = 1 | |
def f2(): | |
y = 2 | |
def f3(): | |
return x+y | |
return f3 | |
return f2 | |
f1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>T</title> | |
<style> | |
body { | |
margin: 0; padding: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Index</title> | |
</head> | |
<body> | |
<div id="chart-div" style="width:400px;height:400px;"></div> | |
<script src="http://yui.yahooapis.com/3.11.0/build/yui/yui-min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this won't work because python's lambda doesn't have real pattern matching | |
return reduce(lambda ((acc, prev_nl), (line_idx, (x, nl))): (acc + [([x], line_idx+1)] if prev_nl else acc[:-1]+[(acc[-1][0]+[x], acc[-1][1])], nl), enumerate(lines_nl), ([], True)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let* ((yin | |
((lambda (cc) (display #\@) cc) (call/cc (lambda (c) c)))) | |
(yang | |
((lambda (cc) (display #\*) cc) (call/cc (lambda (c) c))))) | |
(yang yin)) | |
snapshot A: | |
(let* ((yin | |
((lambda (cc) (display #\@) cc) _)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let* ((yin | |
((lambda (cc) (display #\@) cc) (call-with-current-continuation (lambda (c) c)))) | |
(yang | |
((lambda (cc) (display #\*) cc) (call-with-current-continuation (lambda (c) c))))) | |
(yin yang)) | |
snapshot A: | |
(let* ((yin | |
((lambda (cc) (display #\@) cc) _)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-to-list 'load-path "~/.emacs.d/") | |
;;; ; command=>meta | |
; (setq mac-command-modifier 'meta) | |
; for aquamacs: fullscreen | |
(global-set-key (kbd "<M-f12>") 'ns-toggle-fullscreen) | |
;;; scratch mode | |
(setq initial-major-mode 'text-mode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
else if (t.equals("fastsearch")) { | |
/* same as search, only faster (and single words only) */ | |
if (st.hasMoreTokens()) { | |
String movie_word = st.nextToken(); // !!!!!!!!!!!!!!!!!!!!!!!!! | |
System.out.println("Fast Searching for the movie '" | |
+ movie_word + "'"); | |
q.transaction_fastSearch(cid, movie_word); | |
} else { | |
System.out.println("Error: need to type in movie title"); | |
} |