Would readers well-versed in physics be happier if the equation in the title were `g ≈ π² m/s²` instead of `π² ≈ g`?
gears = filter ((==2) . length)
. map (neighbouringNumbers numbers)
$ filter ((=='*') . fst) symbols
If this Haskell code does not look clear, it's because people are unfamiliar with point-free style, not because the this code is badly written, and especially not because the reader is stupid. right_incr(n) =
g => y => n(g)(g(y))
and using the following shorter fixed-point combinator[2], X(f) =
( a => a(a) )( x => f(x(x)) )
I get this junk: X(right_incr)
= ( a => a(a) )( x => g => y => x(x)(g)(g(y)) )
= ( x => g => y => x(x)(g)(g(y)) ) ( x => g => y => x(x)(g)(g(y)) )
X(right_incr)(g)(y)
= let f = ( x => g => y => x(x)(g)(g(y)) )
in f(f)(g)(y)
= let .. in f(f)(g)(g(y))
= let .. in f(f)(g)(g(g(y)))
= ...
Which, as you can see, only gets more complex when I try to transform it.