|
|
|
|
|
by JoshTriplett
4537 days ago
|
|
The other nice thing about factoring code like this: it often turns up patterns that match existing library functions. For instance, most of sqrtGuesses can be replaced with the "iterate" function: sqrtGuesses n = iterate (\x -> (0.5 * (x + n/x))) 1.0
|
|