Skip to content

Instantly share code, notes, and snippets.

@bboston7
Created January 18, 2014 10:04
Show Gist options
  • Save bboston7/8488454 to your computer and use it in GitHub Desktop.
Save bboston7/8488454 to your computer and use it in GitHub Desktop.
seq.rkt
#lang racket
(define (get-evens file)
(let ([fn (lambda (x) (even? (string->number x)))])
(sequence->list
(sequence-filter
fn
(in-lines (open-input-file (string->path file)))))))
(get-evens "nums.txt")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment