米兰达编码有问题我只是函数式编程的新手,所以如果我没有一个简单的错误,请狠狠地打我一巴掌,所以我学习了
无论如何,我在第 12 行遇到错误,因为 unifyin char 和 char 有问题我的想法是通过使用字典过滤来检查是否拼写正确,这将是单词列表和文件中的另一个列表加在一起
这是我的第 12 行
= [filter (= typed) ((read file) ++ dictionary)]
这是到目前为止我的程序的其余部分
filename == [char]
word == [ char ]
dictionary :: [ word ]
spell:: filename -> filename -> [ char ]
look:: word -> filename ->[[[ char ]]]
look typed file
= [filter (= typed) ((read file) ++ dictionary)]
dictionary =
["aardvark","bell","camp","dictionary","editor","file","ground",
"grounds","help","intelligent","joint","kettle","light","memory",
"nettle","orange","quite","research","standard","terminal",
"umbrella","violin","water","xenon","yellow","zoo","aaa","abb",
"acc","add","aee"]
所以有人能指出我哪里出错了吗?