我正在尝试将以下伪代码转换为 Haskell:
stringA = "ABCD"
stringB = "EFGH"
stringC = "ICJK"
function myFunction(String x) {
otherFunction(x)
}
现在,在 Haskell 我有
stringA = "ABCD";
stringB = "EFGH";
stringC = "ICJK";
test :: Int
test x = if x == 1 then otherFunction(??) else ...
当使用 x =“stringA”调用 test 时,如何确保 otherFunction 将 stringA 作为参数?
谢谢!:)