SICP has something to do with square roots in the first chapter, although I don't think they do this particular refactoring. I first saw it (or something like it) in John Hughes' Why Functional Programming Matters.
Which, by the way, is an excellent paper and totally worth reading.
Which, by the way, is an excellent paper and totally worth reading.
http://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pd...