Value space transformations
Graham Klyne
gk at ninebynine.org
Mon Nov 10 11:43:38 EST 2003
I just found myself writing some code like this:
processFoo processBar = toFoo . processBar . fromFoo
where
fromFoo foo = ...
toFoo bar = ...
and noticed some similarity in style to certain kinds of transformation
used in linear algebra, such as for diagonalization:
D = T M inv(T)
This got me to wondering if this is a common pattern in functional
programming. There seems to be some similarity, for example, with the way
that Monads are sometimes used, where operations are "lifted" into (?) a Monad.
So my questions are:
(a) is there a common functional programming pattern that corresponds to
vector space transformations so that a function defined over one space can
be used in another, and
(b) if so, are there any not-too-heavy papers or articles discussing this
pattern?
#g
------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact
More information about the Haskell-Cafe
mailing list