Skip to content

Instantly share code, notes, and snippets.

@shriphani
Last active December 11, 2015 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shriphani/4532651 to your computer and use it in GitHub Desktop.
Save shriphani/4532651 to your computer and use it in GitHub Desktop.
#lang lazy
(require racket/promise)
(define (port->lines p)
(let ((r (read-line p)))
(if (eof-object? r)
'()
(cons r (port->lines p)))))
(define (file->lines f)
(port->lines (open-input-file f)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment