genSuffixes::[Char]->[[Char]]
getSuffixes (xs) = suffix 0 (xs)
suffix::Int->[Char]->[[Char]]
suffix n (xs) = if n==length(xs)
then(xs)
else drop n (xs) ++ suffix (n+1) (xs)
genSuffixes
尝试编译代码时,我得到“缺少伴随绑定的类型签名”。
genSuffixes::[Char]->[[Char]]
getSuffixes (xs) = suffix 0 (xs)
suffix::Int->[Char]->[[Char]]
suffix n (xs) = if n==length(xs)
then(xs)
else drop n (xs) ++ suffix (n+1) (xs)
genSuffixes
尝试编译代码时,我得到“缺少伴随绑定的类型签名”。