Menu

#1282 lambda[...] doesn't give error

None
open
nobody
lambda (5)
3
2024-05-31
2007-10-17
No

lambda[[x],x^2] is accepted by the parser, and the evaluator is willing to apply it:

lambda[[x],x^2](4) => 16

but other parts of Maxima don't treat it as a lambda expression:

lambda([x],x),x=3 => lambda([x],x)

lambda[[x],x],x=3 => lambda[[3],3]

lambda[...] should give an error.

Discussion

  • Robert Dodier

    Robert Dodier - 2024-05-31
    • labels: Lisp Core --> lambda
    • Group: --> None
     
  • Robert Dodier

    Robert Dodier - 2024-05-31

    I agree that lambda[[x], ...] shouldn't be treated as a function, but I'm not sure it should be an error. Something like lambda[3] could be treated as an ordinary subscripted variable (as it is now).

     

Log in to post a comment.