Skip to content

Instantly share code, notes, and snippets.

@StreetStrider
Created January 10, 2014 19:35
Show Gist options
  • Save StreetStrider/8361052 to your computer and use it in GitHub Desktop.
Save StreetStrider/8361052 to your computer and use it in GitHub Desktop.
#lang racket
(define (@map fn L)
(foldl
(lambda (i A)
(append A (list (fn i)))
)
empty
L
)
)
(define (@sqr x) (* x x))
(print (@map @sqr '(1 2 3)))
(newline)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment