
28 Mar
2009
28 Mar
'09
9:53 p.m.
How would an experienced guy write this without parentheses?
I'm fairly certain it's impossible to write it without using parentheses. I would probably just write
x - fromInteger (floor x)
Never impossible! flip subtract x . fromInteger $ floor x case floor x of y -> x - fromInteger y let y = floor x in x - fromInteger y I guess I wouldn't choose any of these for readability, though. Brent's version is succinct. Cheers, John