scheme: check for optional arguments


/ Published in: Scheme
Save to your folder(s)



Copy this code and paste it in your HTML
  1. (define-macro (p r . otherstuff)
  2. `(if (null? (list ,@otherstuff))
  3. (print ,r)
  4. (print ,@otherstuff)))
  5.  
  6. (p 'c 'ciao)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.