Arc Forumnew | comments | leaders | submit | applepie's commentslogin
1 point by applepie 6300 days ago | link | parent | on: Lambda with a name

You probably want something like this:

  ;; "named" fn
  (mac nfn (name args . body)
    `(fn ,args
       (ccc
         (fn (,(sym (string "ret-from-" name)))
           ,@body))))

  ;; Example:
  ;; returns 10 but doesn't print "hi"
  ((nfn a () (ret-from-a 10) (prn "hi")))

-----


Even being a long-time lisper (meaning I don't feel parentheses are evil), I found the colons visually more pleasant.

-----

1 point by applepie 6300 days ago | link | parent | on: Monadic-like macro

Sorry about the bugs. I transcribed it from paper :$

-----