gpt4 book ai didi

haskell - 计算类型 Haskell

转载 作者:行者123 更新时间:2023-12-04 22:11:25 26 4
gpt4 key购买 nike

如何在 Haskell 中计算 (.)(.) 的类型?
我知道应该是

(.)(.) :: (a -> b -> c) -> a -> (a1 -> b) -> a1 -> c

但是没有电脑怎么计算呢?

最佳答案

(.)    :: (b        -> c                     ) -> ((a -> b)        -> (a -> c))
(.) :: ((e -> f) -> ((d -> e) -> (d -> f)))
(.)(.) :: ((a -> (e -> f)) -> (a -> ((d -> e) -> (d -> f))))
(.)(.) :: (a -> (e -> f)) -> (a -> ((d -> e) -> (d -> f)))
(.)(.) :: (a -> e -> f) -> a -> ((d -> e) -> (d -> f))
(.)(.) :: (a -> e -> f) -> a -> (d -> e) -> (d -> f)
(.)(.) :: (a -> e -> f) -> a -> (d -> e) -> d -> f

关于haskell - 计算类型 Haskell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29875684/

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