Skip to content

Instantly share code, notes, and snippets.

View mikeyhc's full-sized avatar

Mike Blockley mikeyhc

View GitHub Profile
(use chicken-syntax intarweb uri-common)
(use spiffy)
(use srfi-13)
(define (build-path-symbol)
(define path #f)
(if (not path)
(set! path (apply symbol-append
(map (lambda (x) (if (string? x) (string->symbol x) x))
@mikeyhc
mikeyhc / diamond-op.scm
Created October 29, 2015 02:02
adding the perl diamond operator to scheme
(define-syntax <>
(syntax-rules ()
((_ v e ...)
(if (null? (command-line-arguments))
(let loop ((v (read-line)))
(unless (eof-object? v)
e ...
(loop (read-line))))
(let file-loop ((port (open-input-file (car (command-line-arguments))))
(rest (cdr (command-line-arguments))))