public
Description: various code snippets in various languages
Homepage: http://spotless-spots.blogspot.com
Clone URL: git://github.com/namin/spots.git
olpc (author)
Wed Mar 18 16:31:04 -0700 2009
commit  fb5d7f36a7a5a302e3f2dd3086faeffa1763716f
tree    053d01820de7456e771a65062d11992ac007412e
parent  266a015ff090cea119e4356eae0cba32be6b02d1
spots / errorEstimation
errorEstimation/README.markdown

Error Estimation

I translated the example Using F# Quotations for Error Estimation from Chapter 9 of Expert F# (Introducing Language-Oriented Programming) to Scala. I don't use anything as fancy as F# quotations. Instead, I simply create a new arithmetic type for estimates, and use implicit views to handily convert from the usual arithmetic types.

The example also translates nicely into Haskell by using the numeric type classes.