rs
最初の where セクションの定義の何が問題になっていますか?
palindrome :: [a] -> [a]
palindrome xs = con xs rs
where con a b = rev (rev a []) b
rs = rev xs -- here
where rev [] rs = rs
rev (x:xs) rs = rev xs (x:rs)
私はちょうど Haskell を学んでいますが、その構文規則は私を混乱させます。エラーメッセージは
[1 of 1] Compiling Main ( pelindrome.hs, interpreted )
pelindrome.hs:5:8: parse error on input `rs'