Common lisp: macro vs functions (for beginners)

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 4

  • @xabixps
    @xabixps Рік тому +3

    I think you have an error in the conditional, instead of
    `(if ,(first exprs)
    ,(first exprs)
    (my-and ,@(rest exprs)))
    is
    `(if ,(first exprs)
    (my-and ,@(rest exprs))
    ,(first exprs))

    • @the-lisper
      @the-lisper  Рік тому +3

      Yes! You are right! I should do more TDD to avoid this kind of mistake!

  • @leandrohernandez386
    @leandrohernandez386 Рік тому +2

    my-and or my-or. I think that the behavior of the macro seems more like an OR. Makes sense?

    • @the-lisper
      @the-lisper  Рік тому +4

      Yes, it is, it was an oversight of mine!