I've created a proof-of-concept linear regression module for my dstats statistics library with an API that makes heavy use of ranges and lazy evaluation, instead of using a traditional matrix-based approach. This could be an interesting demonstration of the kind of high-level functionality that can be implemented on top of the range primitive, when combined with the new Phobos and D's other template features.
Docs: http://svn.dsource.org/projects/dstats/docs/regress.html Code: http://dsource.org/projects/dstats/browser/trunk/regress.d