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
| #! /usr/bin/python | |
| """Implementation of the arrow abstraction for functions. | |
| Abstracting functions with Arrows has advantages. Arrows make it very easy to | |
| compose functions (by simply 'multiplying' them with the `*` operator). The | |
| order in which the arrows are written match the order of the computations, | |
| making long pipelines easy to work with. Arrows also provide mechanisms for | |
| creating and merging branches, which helps when a value needs to be consumed by | |
| several functions, or when a function needs values from several sources. Arrows | |
| can also support conditional application, selecting which of two functions f and |
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
| ;; outlet code for implementing traditional macro expansion | |
| ;; macros | |
| (define (expand form) | |
| (cond | |
| ((variable? form) form) | |
| ((literal? form) form) | |
| ((macro? (car form)) | |
| (expand ((macro-function (car form)) form))) |
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
| """Self-pipe trick utilities, and a green implementation of `zmq.device()`.""" | |
| from functools import wraps | |
| import fcntl | |
| import os | |
| import sys | |
| import threading | |
| import gevent.socket | |
| from gevent_zeromq import zmq |
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
| ; A REPL-based, annotated Seesaw tutorial | |
| ; Please visit https://github.com/daveray/seesaw for more info | |
| ; | |
| ; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
| ; Seesaw's basic features and philosophy, but only scratches the surface | |
| ; of what's available. It only assumes knowledge of Clojure. No Swing or | |
| ; Java experience is needed. | |
| ; | |
| ; This material was first presented in a talk at @CraftsmanGuild in | |
| ; Ann Arbor, MI. |
NewerOlder