Arc Forumnew | comments | leaders | submitlogin
4 points by simonb 5941 days ago | link | parent

Since what let does is create a closure, it will swallow anything a lambda-list will. You can for instance use optional arguments:

  (let (foo baz (o bar 3)) '(1 2)
    (+ foo baz bar))
This also means you can't bind symbol "o" to the first value of a list being destructured:

  (let (foo baz (o bar)) '(1 2 (3 4))
    (+ foo baz bar o))
  Error: "reference to undefined identifier: _o"


2 points by ryszard_szopa 5941 days ago | link

Heh, not being able to bind to o by destructuring doesn't look like an intended behavior... Anyway, using `o' in order to mark optional arguments looked suspicious from the beginning. And now we know why.

-----