PasteRack.org
Paste # 63432
2017-03-01 00:13:46

Forked from paste # 41664.

Fork as a new paste.

Paste viewed 327 times.


Embed:

define-runtime-path-a-lot-maybe-macros

  1. #lang scribble/manual
  2.  
  3. @require[racket/runtime-path]
  4.  
  5. ; how do i take lines like this:
  6. @define-runtime-path[square-1.png "square-1.png"]
  7. @define-runtime-path[square-2.png "square-2.png"]
  8. @define-runtime-path[square-1-3.png "square-1-3.png"]
  9. @define-runtime-path[square-2-1.png "square-2-1.png"]
  10. @define-runtime-path[square-3-1.png "square-3-1.png"]
  11.  
  12. ; and make it so i can write lines like this instead:
  13. @define-runtime-path-q[square-1.png]
  14. ; ?
  15.  
  16. ; i'm guessing this is something that can be done with macros,
  17. ; but i don't know where to start

=>