首页 > 解决方案 > 无法在 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

标签: haskellproduct

解决方案



推荐阅读