gpt4 book ai didi

clojure - Clojure 有像 Mathematica 的 % 这样的功能吗?

转载 作者:行者123 更新时间:2023-12-04 22:47:14 24 4
gpt4 key购买 nike

在 Mathematica 中,%函数产生上一行的值。 Clojure(Leiningen REPL)中有对应的函数吗?
Mathematica Documentation :

%n or Out[n]is a global object that is assigned to be the value produced on the n^(th) output line.

%gives the last result generated.

%%gives the result before last. %%...% (k times) gives the k^(th) previous result.

最佳答案

是的,partially .从 REPL 中你会得到前三个结果:
*1对于最近的结果*2下一个最近的*3排名第三,尽管这就是你得到的全部。*e对于最近的异常(exception),使其成为顶级。

不过,它似乎没有像 Mathmatica 那样的任意记忆。还值得注意的是,这些只能从 repl 中获得,而不是在您的函数或命名空间中。

关于clojure - Clojure 有像 Mathematica 的 % 这样的功能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19373768/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com