Guest User

Untitled

a guest
May 24th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. ; In Gauche.
  2. ; But it's ugly. Isn't there smarter solution?
  3.  
  4. (define-syntax define!
  5. (syntax-rules ()
  6. [(_ name)
  7. (let1 name!s (string-append (symbol->string 'name) "!")
  8. (map (cut eval <> (current-module))
  9. `((define ,(string->symbol name!s) ,name!s)
  10. (define name (symbol->string 'name)))))]))
Add Comment
Please, Sign In to add comment