Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2012
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (ns aliasmacro)
  2.  
  3. ;; In REPL:
  4. ;; => (compile 'aliasmacro)
  5. ;; In a new REPL:
  6. ;; => (use 'aliasmacro)
  7. ;; => (mac-alias)
  8. ;; ArityException Wrong number of args (0) passed to:
  9. ;; aliasmacro$my-macro  clojure.lang.AFn.throwArity (AFn.java:437)
  10. ;;
  11. ;; => (mac-alias 1)
  12. ;; ArityException Wrong number of args (1) passed to:
  13. ;; aliasmacro$my-macro  clojure.lang.AFn.throwArity (AFn.java:437)
  14. ;;
  15. ;; => (mac-alias 1 1)
  16. ;; ()
  17. ;;
  18. ;; => (mac-alias 1 1 1)
  19. ;; ArityException Wrong number of args (3) passed to:
  20. ;; aliasmacro$my-macro  clojure.lang.AFn.throwArity (AFn.java:437)
  21.  
  22. (defmacro my-macro [] '())
  23. (def #^{:macro true} mac-alias #'my-macro)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement