Cutting substrings in Haskell How can I improve readability of this code? indentChar needs to be reused elsewhere.

toCoordinate = dropWhile ((||) &lt;$&gt; (not . indentChar) &lt;*&gt; (=='(')) &gt;&gt;&gt; takeWhile(/= ' ')
indentChar = (||) &lt;$&gt; isAlpha &lt;*&gt; (=='(')


Desired result:

*Parse&gt; toCoordinate " \\--(my.coordinate - from outerspace)"
"my.coordinate"
The first thing I observe is that the dropWhile function argument is:

\x -&gt; (not . indentChar) x || '(' == x

The comparison to '(' cancels out that same comparison in indentChar -- so the following definition of toCoordinate is identical in meaning:

toCoordinate = dropWhile (not . isAlpha) &gt;&gt;&gt; takeWhile (/= ' ')

You did state that you need to use indentChar elsewhere -- but not using it here makes your code clearer.

Additionally, rather than use arrows, the above definition seems clearer to me when using function composition -- I would write it as:

toCoordinate = takeWhile (/= ' ') . dropWhile (not . isAlpha)