Skip to content

Instantly share code, notes, and snippets.

@StreetStrider
Created January 10, 2014 19:36
Show Gist options
  • Save StreetStrider/8361061 to your computer and use it in GitHub Desktop.
Save StreetStrider/8361061 to your computer and use it in GitHub Desktop.
#lang racket
(define (@filter fn L)
(foldl
(lambda (i A)
(if (fn i)
(append A (list i))
A
)
)
empty
L
)
)
(print (@filter positive? '(-1 -2 3 4 7 -0 -5)))
(newline)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment