Even if cleaning and reusing the water itself might not be economic in a domestic context (and by the way, that is not so clear - especially as regards using "grey" water to flush toilets) it still makes sense to try to recover some of that heat before it goes down the drain. The most effective, but somewhat high-tech, way to do that would be to store the warm "grey" water somewhere and use it as the source for a heat pump. However, simpler devices can be effective too.
For instance, one can fit a shower drain with a heat exchanger like the one illustrated from ReTherm. The idea is that the cold water supply to the shower exchanges heat with the waste water running down the drain. The cold supply therefore arrives at the showerhead somewhat pre-warmed, and this reduces the demand on the hot water heater.
It is pretty easy to do an idealized mathematical analysis of the performance of this system. What one finds is the following. If a denotes the setting of the shower temperature mixer, then with the usual plumbing arrangement the showerhead temperature is
ah + (1-a)c
where h is the hot supply temperature and c the cold. With the (idealized) heat exchanger in play this changes to
(2a-a2)h + (1-a)2c
If you know a little calculus you'll see immediately that this means the shower temperature control becomes "twice as effective" when it is at the lower end of its range. Towards the upper end (i.e. if your shower is as hot as your hot water supply) recycling heat becomes less effective because the relative amount of cold water used is less.
Note The ReTherm device illustrated is installed in a slightly different way than described above - it preheats the cold water supply to the hot water heater rather than the cold water supply to the shower. Although this changes some of the details of the above analysis, the overall energy savings are the same.