我在Haskell中定义函数时遇到问题。我想要做的输入EnvV
类型的变量和Store
类型之一,并返回一个State
类型变量:Haskell函数定义
type Variable = String
type Z = Integer
type T = Bool
type State = Variable -> Z
type Location = Z
type Store = Location -> Z
type EnvV = Variable -> Location
search :: EnvV -> Store -> State
search envV store = envV(store)
类型的函数'EnvV'需要'Variable'又名'String',当你把它应用到'Store'。请详细说明你想要做什么。 – bereal 2015-04-06 09:21:56
无关注:功能应用程序不需要括号(所以你应该写'envV store'而不是'envV(store)')。 – 2015-04-06 09:25:16