## maxima-bugs

 [Maxima-bugs] [ maxima-Bugs-679437 ] DEFINE documentation From: SourceForge.net - 2003-02-03 11:47:07 ```Bugs item #679437, was opened at 2003-02-03 22:52 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=679437&group_id=4933 Category: Documentation Group: None Status: Open Resolution: None Priority: 5 Submitted By: David Billinghurst (billingd) Assigned to: Nobody/Anonymous (nobody) Summary: DEFINE documentation Initial Comment: From http://www.math.utexas.edu/pipermail/maxima/2002/002 789.html The docu says - Function: DEFINE (f(x1, ...), body) is equivalent to f(x1,...):="body but when used inside functions it happens at execution time rather than at the time of definition of the function which contains it. Asside from the fact that " should (globally, at least also in "Introduction to Command Line") be replaced by '', define(f(x),Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x])); returns f(x) := f[x] and f(x):=''Block([],local(f),Map(lambda([x,y],f[x]:y),[1,3,5], [2,5,1]),f[x]); returns f(x):=BLOCK([],LOCAL(f),MAP(LAMBDA([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]) so, it seems that this is not really an equivalence. In fact, it seems to me that '' doen't do anything in this context. Furthermore g():= f(x):=''Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]); (as well as the same statement without '' ) makes g(); return f(x):=BLOCK([],LOCAL(f),MAP(LAMBDA([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]) (and now f is defined), while g():=define(f(x),Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x])); makes g(); return f(x):=f[x] (which is what I expected) So, I think the docu should say something like - Function: DEFINE (f(x1, ...), body) is equivalent to f(x1,...):=evaluated_body, where evaluated_body is the evaluation of body. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=679437&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-679437 ] DEFINE documentation From: SourceForge.net - 2003-07-07 21:12:49 ```Bugs item #679437, was opened at 2003-02-03 06:52 Message generated for change (Comment added) made by macrakis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=679437&group_id=4933 Category: Documentation Group: None Status: Open Resolution: None Priority: 5 Submitted By: David Billinghurst (billingd) Assigned to: Nobody/Anonymous (nobody) Summary: DEFINE documentation Initial Comment: From http://www.math.utexas.edu/pipermail/maxima/2002/002 789.html The docu says - Function: DEFINE (f(x1, ...), body) is equivalent to f(x1,...):="body but when used inside functions it happens at execution time rather than at the time of definition of the function which contains it. Asside from the fact that " should (globally, at least also in "Introduction to Command Line") be replaced by '', define(f(x),Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x])); returns f(x) := f[x] and f(x):=''Block([],local(f),Map(lambda([x,y],f[x]:y),[1,3,5], [2,5,1]),f[x]); returns f(x):=BLOCK([],LOCAL(f),MAP(LAMBDA([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]) so, it seems that this is not really an equivalence. In fact, it seems to me that '' doen't do anything in this context. Furthermore g():= f(x):=''Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]); (as well as the same statement without '' ) makes g(); return f(x):=BLOCK([],LOCAL(f),MAP(LAMBDA([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]) (and now f is defined), while g():=define(f(x),Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x])); makes g(); return f(x):=f[x] (which is what I expected) So, I think the docu should say something like - Function: DEFINE (f(x1, ...), body) is equivalent to f(x1,...):=evaluated_body, where evaluated_body is the evaluation of body. ---------------------------------------------------------------------- >Comment By: Stavros Macrakis (macrakis) Date: 2003-07-07 17:12 Message: Logged In: YES user_id=588346 The problem here is that ''f(x) is not equivalent to ''(f(x)). The documenation should say ...is equivalent to f(x1,...):=''(body) Now, WHY is ''f(x) not equivalent to ''(f(x))? Well, that is in my opinion a design error, but since it is documented under '', I suppose it can't be considered a bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=679437&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-679437 ] DEFINE documentation From: SourceForge.net - 2003-07-19 13:58:00 ```Bugs item #679437, was opened at 2003-02-03 22:52 Message generated for change (Comment added) made by billingd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=679437&group_id=4933 Category: Documentation Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: David Billinghurst (billingd) Assigned to: Nobody/Anonymous (nobody) Summary: DEFINE documentation Initial Comment: From http://www.math.utexas.edu/pipermail/maxima/2002/002 789.html The docu says - Function: DEFINE (f(x1, ...), body) is equivalent to f(x1,...):="body but when used inside functions it happens at execution time rather than at the time of definition of the function which contains it. Asside from the fact that " should (globally, at least also in "Introduction to Command Line") be replaced by '', define(f(x),Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x])); returns f(x) := f[x] and f(x):=''Block([],local(f),Map(lambda([x,y],f[x]:y),[1,3,5], [2,5,1]),f[x]); returns f(x):=BLOCK([],LOCAL(f),MAP(LAMBDA([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]) so, it seems that this is not really an equivalence. In fact, it seems to me that '' doen't do anything in this context. Furthermore g():= f(x):=''Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]); (as well as the same statement without '' ) makes g(); return f(x):=BLOCK([],LOCAL(f),MAP(LAMBDA([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]) (and now f is defined), while g():=define(f(x),Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x])); makes g(); return f(x):=f[x] (which is what I expected) So, I think the docu should say something like - Function: DEFINE (f(x1, ...), body) is equivalent to f(x1,...):=evaluated_body, where evaluated_body is the evaluation of body. ---------------------------------------------------------------------- >Comment By: David Billinghurst (billingd) Date: 2003-07-19 23:57 Message: Logged In: YES user_id=365569 Suggested change made to Function.texi ---------------------------------------------------------------------- Comment By: Stavros Macrakis (macrakis) Date: 2003-07-08 07:12 Message: Logged In: YES user_id=588346 The problem here is that ''f(x) is not equivalent to ''(f(x)). The documenation should say ...is equivalent to f(x1,...):=''(body) Now, WHY is ''f(x) not equivalent to ''(f(x))? Well, that is in my opinion a design error, but since it is documented under '', I suppose it can't be considered a bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=679437&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-679437 ] DEFINE documentation From: SourceForge.net - 2003-07-19 14:19:16 ```Bugs item #679437, was opened at 2003-02-03 22:52 Message generated for change (Comment added) made by billingd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=679437&group_id=4933 Category: Documentation Group: None Status: Closed >Resolution: Fixed Priority: 5 Submitted By: David Billinghurst (billingd) Assigned to: Nobody/Anonymous (nobody) Summary: DEFINE documentation Initial Comment: From http://www.math.utexas.edu/pipermail/maxima/2002/002 789.html The docu says - Function: DEFINE (f(x1, ...), body) is equivalent to f(x1,...):="body but when used inside functions it happens at execution time rather than at the time of definition of the function which contains it. Asside from the fact that " should (globally, at least also in "Introduction to Command Line") be replaced by '', define(f(x),Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x])); returns f(x) := f[x] and f(x):=''Block([],local(f),Map(lambda([x,y],f[x]:y),[1,3,5], [2,5,1]),f[x]); returns f(x):=BLOCK([],LOCAL(f),MAP(LAMBDA([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]) so, it seems that this is not really an equivalence. In fact, it seems to me that '' doen't do anything in this context. Furthermore g():= f(x):=''Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]); (as well as the same statement without '' ) makes g(); return f(x):=BLOCK([],LOCAL(f),MAP(LAMBDA([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x]) (and now f is defined), while g():=define(f(x),Block([],local(f),Map(lambda([x,y],f[x]:y), [1,3,5],[2,5,1]),f[x])); makes g(); return f(x):=f[x] (which is what I expected) So, I think the docu should say something like - Function: DEFINE (f(x1, ...), body) is equivalent to f(x1,...):=evaluated_body, where evaluated_body is the evaluation of body. ---------------------------------------------------------------------- >Comment By: David Billinghurst (billingd) Date: 2003-07-20 00:19 Message: Logged In: YES user_id=365569 Forgot to say it was fixed ---------------------------------------------------------------------- Comment By: David Billinghurst (billingd) Date: 2003-07-19 23:57 Message: Logged In: YES user_id=365569 Suggested change made to Function.texi ---------------------------------------------------------------------- Comment By: Stavros Macrakis (macrakis) Date: 2003-07-08 07:12 Message: Logged In: YES user_id=588346 The problem here is that ''f(x) is not equivalent to ''(f(x)). The documenation should say ...is equivalent to f(x1,...):=''(body) Now, WHY is ''f(x) not equivalent to ''(f(x))? Well, that is in my opinion a design error, but since it is documented under '', I suppose it can't be considered a bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=679437&group_id=4933 ```

No, thanks