您如何称呼这种函数式语言功能?
好吧,够尴尬的了,我发布了我需要解释的代码 。 具体来说,它首先将绝对值和减法链接在一起,然后进行排序,同时根本不必提及参数和参数,因为存在可以连接这些函数“动词”的“副词”
什么(非- 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这类似于 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."