This file contains 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
import Window | |
import Mouse | |
main = render <~ Window.dimensions ~ allMoves | |
mousePos = | |
let nomalize = \(w,h) (x,y) -> (toFloat x - toFloat w / 2, toFloat h / 2 - toFloat y) | |
in nomalize <~ Window.dimensions ~ Mouse.position | |
mouseDownAndPos = lift2 (,) Mouse.isDown mousePos |
This file contains 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
javascript:(function(){var parser=new DOMParser();var ss=parser.parseFromString(atob(""),'application/xml');var xsltProcessor=new XSLTProcessor();xsltProcessor.importStylesheet(ss);var newdoc=xsltProcessor.transformToDocument(content.document);var myWindow=window.open("data:text/html,"+encodeURIComponent(newdoc.documentElement.innerHTML),"_blank","");myWindow.focus();}()); |
This file contains 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
import time | |
import sys | |
ms = int(sys.argv[1]) if len(sys.argv) > 1 else 250 | |
words, start = 0, time.time() | |
print "\n"*2 | |
try: | |
for line in sys.stdin: |
This file contains 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
(defmacro where [& body] | |
"where is identical to let, but with bindings | |
at the end of the argument list." | |
`(let ~(last body) | |
~@(butlast body))) | |
(-> 5 | |
(+ i) | |
(- j) |
NewerOlder