Skip to content

Instantly share code, notes, and snippets.

@NoCheroot
Last active February 13, 2018 20:42
Show Gist options
  • Select an option

  • Save NoCheroot/66287493b40b867124b905a9f80ff756 to your computer and use it in GitHub Desktop.

Select an option

Save NoCheroot/66287493b40b867124b905a9f80ff756 to your computer and use it in GitHub Desktop.
Racket namespace-mapped-symbols example
#lang racket
(let ([n (make-base-namespace)])
(parameterize ([current-namespace n])
(eval '(define (oneplusone) (+ 1 1)))
(eval '(define (oneplustwo) (+ 1 2)))
(filter (lambda (y) (regexp-match #px"^one" y))
(map (lambda (x) (symbol->string x)) (namespace-mapped-symbols n)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment