Compute text area given letter heights and a text
getintval is just fromMaybe 1. finder always produces Just - you probably meant to map Nothing to Nothing. finder' is just lookup. foldl (\acc x -&gt; max acc x) 1 is just maximum (so long as ch is never empty). k can be inlined.

solve' :: [Char] -&gt; [(Char, Int)] -&gt; Int
solve' ch lst = (*length ch) $ maximum $ map (fromMaybe 1 . (`lookup` lst)) ch


zipWith (\x y -&gt; (x, y)) is just zip. read's type can be deduced. rec and word1 can be inlined.

solve :: [Char] -&gt; [Char] -&gt; Int
solve wght val = solve' val $ zip ['a'..'z'] $ map read $ words wght


mapMaybe throws away invalid characters. We can flatten the call tree by letting main assemble the pieces.

solve :: [Char] -&gt; [(Char, Int)] -&gt; Int
solve ch lst = (*length ch) $ maximum $ mapMaybe (`lookup` lst) ch

parse :: [Char] -&gt; [(Char, Int)]
parse = zip ['a'..'z'] . map read . words

main :: IO ()
main = do
  weight &lt;- getLine
  pdfstr &lt;- getLine
  print $ solve pdfstr $ parse weight