Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 3292 days ago | link | parent

Arc/anarki is more minimalist than common lisp and won't warn you about unused variables, so I think the answer here is: nothing :) Here's the equivalent macro in anarki:

  (mac tree-leaves (tree test result)
    `(tree-leaves%% ,tree ,test ,result))
Might as well call the function directly :)

(And no, this wasn't asked before. I'd never gotten past the first couple of chapters of letoverlambda. Maybe I should go back to it.)



2 points by cthammett 3292 days ago | link

Hey thank you this is very helpful for beginners like me. I am working through it to learn, practice and master the ideas presented in the book.

-----

1 point by akkartik 3292 days ago | link

You're welcome. By the way, if you add two spaces to a line on this forum it won't run through with the next one. Compare these two examples:

line1 line2

  line1
  line2
This is useful when showing code.

Feel free to ask more questions!

-----

2 points by cthammett 3286 days ago | link

Hey thanks for saving me further embarrassment. If I were to ask another question should I start another thread? In particular I am trying to translate to arc a matching function in Paul Graham's On Lisp, Fig 18.5. After this I am hoping to learn about Query Interpreters Fig 19.3 and Query Compilers Fig 19.6

-----

1 point by akkartik 3286 days ago | link

Whatever you like! Don't worry about dominating the frontpage or anything. Feel free to open new threads as needed.

-----