0

I am trying to use a function on a list of S-expressions, but it just gives me an error "Unbound variable butter".

(depth* (()
         ((bitter butter)
          (makes)
          (butter bitter)
         butter)))
Óscar López
  • 232,561
  • 37
  • 312
  • 386
luojiebin
  • 103
  • 2
  • 3
  • 14

1 Answers1

1

It appears that you forgot to quote the s-expression, try this:

(depth* '(() ; notice the quote at the start of the list
          ((bitter butter)
           (makes)
           (butter bitter)
           butter)))
Óscar López
  • 232,561
  • 37
  • 312
  • 386