Created
January 10, 2014 19:36
-
-
Save StreetStrider/8361061 to your computer and use it in GitHub Desktop.
This file contains 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
#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