如何计算(> 0)的类型?
每当我有一个左参数部分应用的操作员部分时,即:
(0 >)
我只是只需以其前缀形式重写操作员,然后进行计算:
(>) 0
我如何计算具有其右参数部分应用?
Whenever I have an operator section with its left argument partially applied, i.e:
(0 >)
I just simply rewrite the operator in its prefix form and proceed with calculation:
(>) 0
How can I calculate the type of an operator section that has its right argument partially applied ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于
(>)
,这没关系,因为两个参数都具有相同的类型。删除ORD A =>
来自ORD A => a - > a - > bool
,您将留下ord A => a - >布尔
。在一般中,您只需删除与应用参数相对应的类型。例如,给定
(??):: int-> char - >布尔
,For
(>)
, it doesn't matter, because both arguments have the same type. Remove eitherOrd a => a
fromOrd a => a -> a -> Bool
, and you are left withOrd a => a -> Bool
.In general, you just remove the type corresponding to the applied argument. For example, given
(??) :: Int -> Char -> Bool
,