我在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