lisp - Maxima CAS 中的函数定义
问题描述
我有一个功能:
GiveBTree(z, depthMax):=block(
[ zz, t1, t2, tmp],
zz :[],
t1 :[z],
t2 :[],
tmp :[],
for depth : 1 thru depthMax step 1 do (
for z in t1 do (
tmp : Give2Preimages(z),
zz : append(tmp, zz),
t2 : append(tmp, t2)
)
tmp:[],
t1:t2
),
zz:flatten(zz),
return (zz)
)$
当我把它放在千里马时,我有:
Maxima 5.43.2 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) GiveBTree(z, depthMax):=block(
[ zz, t1, t2, tmp],
zz :[],
t1 :[z],
t2 :[],
tmp :[],
Display all 2857 possibilities? (y or n)
JACOBI_CD
! JACOBI_CN
!! JACOBI_CS
# JACOBI_DC
$ JACOBI_DN
问题似乎在 tmp 之后开始。
所以我检查了:
- 谷歌搜索:maxima cas“显示全部”
- 最大值函数索引
- 描述(tmp)
这个定义有什么问题?
解决方案
正如罗伯特·多迪尔所说,我已经完成了这些步骤:
(%i2) load("g.mac");
(%o2) g.mac
所以问题是由“复制和粘贴”引起的。
推荐阅读
- postman - 在邮递员中查看图片
- javascript - 合并数组JS里面的对应对象
- node.js - 在 mongoose 中使用 findByIdAndUpdate 方法时仅获得弃用警告,而不是结果或任何错误
- qt - QML 自动锚定几个项目
- javascript - Apex 图表文本截断自定义
- reactjs - 从 react-native 中的另一个页面调用函数
- c# - 在 C# 中解密使用 AmpScript AES 加密的 Salesforce Marketing 电子邮件值?
- java - 如何使用 Java 解析 docx 文档中的部分 html?
- c++ - C++ 使用另一个标识符下的标头中包含的类
- python - 如何从网页上的链接中获取文本?