Exploding a symbol
December 10, 2009by Lee Spector (lspector)
Here’s a procedure to turn a symbol into a list of symbols, each made from one character of the original symbol:
(define explode (lambda (sym) (map string->symbol (map (lambda (c) (make-string 1 c)) (string->list (symbol->string sym)))))) (explode 'boom)
-Lee