To make a function pointfree, you need to rearrange the uses of all of its arguments such that they can be eta-reduced away. In this case, the argument is already used exactly once and all the way on the right, so all you need to do is get it out of the parentheses, which you can do by using function composition (.):
in2out :: String -> String
in2out s =
(show . sumAllLineValues . lines) s
To make a function pointfree, you need to rearrange the uses of all of its arguments such that they can be eta-reduced away. In this case, the argument is already used exactly once and all the way on the right, so all you need to do is get it out of the parentheses, which you can do by using function composition (
.):And then eta-reduce it away: