您如何称呼这种函数式语言功能?

发布于 2024-07-11 18:44:53 字数 306 浏览 5 评论 0原文

好吧,够尴尬的了,我发布了我需要解释的代码 。 具体来说,它首先将绝对值和减法链接在一起,然后进行排序,同时根本不必提及参数和参数,因为存在可以连接这些函数“动词”的“副词”

什么(非- APL类型)语言支持这种无参数函数组合(我有一个模糊的想法,它与单子/二元和等级的概念密切相关,但仅通过阅读很难获得特别容易理解的图片维基百科)以及我如何称呼这个概念?

ok, embarrassing enough, I posted code that I need explained. Specifically, it first chains absolute value and subtraction together, then tacks on a sort, all the while not having to mention parameters and arguments at all, because of the presense of "adverbs" that can join these functions "verbs"

What (non-APL-type) languages support this kind of no-arguments function composition (I have the vague idea it ties in strongly to the concepts of monad/dyad and rank, but its hard to get a particularly easy-to-understand picture just from reading Wikipedia) and what do I call this concept?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

内心激荡 2024-07-18 18:44:53

这类似于 pointfree 风格; 这可以通过组合和柯里化来实现。 Haskell 和 ML 等函数式语言都使用它。

Joy、Factor 和 Cat 等连接编程语言也有这些“副词”。

This is similar to pointfree style; this works though composition and currying. Functional languages such as Haskell and ML use this.

Concatenative programming languages like Joy, Factor, and Cat also have these "adverbs."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文