haskell - 无法在 Haskell 中使用产品
问题描述
我想运行这个(primelist = 所有素数的列表,translate = 给我一个 lsit 的数字):
encode :: Dictionary -> String -> Integer
encode ((a,b):xs) (y:ys) = product zipWith (^) [n | n <-primeList] [m | m<-translate ((a,b):xs) (y:ys)]
我得到:
Couldn't match type `[c0]' with `[Integer] -> [Integer]' problem
解决方案
推荐阅读
- python - 查找给定字符串中所有可能的子序列
- java - catch 块中的 throw 语句如何防止未初始化变量的编译器错误?
- javascript - 标签名称属性未使用 Vue 定义,但可在浏览器中访问
- css - 如何将 CSS 工具提示应用于表格整行?
- amazon-web-services - 如何在 AWS CloudWatch 日志组中删除订阅
- php - 使用 load() 的嵌套预加载
- r - 在时间序列数据中插入缺失的行
- python - 尝试修复 SQL 语法中的错误;检查与您的 MySQL 服务器版本相对应的手册以获取正确的语法
- html - 需要帮助将我的导航栏链接居中,因为在右侧添加了搜索栏。任何人?
- c - 将 void* 转换为没有 sprintf 或 C 库函数的 C 样式字符串