 
            I'm trying to write some code which involves lots of matrix multiplications, but whenever I do too many, I get stack overflows (in both GHCi 6.4.2, and Hugs May 2006). The following code exhibits the problem. .. I tried to fix the problem using seq, as follows:
iterate' f x = x : seq x' (iterate' f x') where x' = f x
since you're working with lists, and nested at that, seq isn't going to buy much
(it'll evaluate the matrix to being non-empty, without forcing its rows, let alone
elements). you might find the recent thread on avoiding temporary arrays interesting:
http://www.haskell.org/pipermail/haskell-cafe/2007-March/023286.html
if you like to stay with binary lists, you might want to consider using strict lists
(no unevaluated heads or tails. i happen to have some strict list code lying around 
from that earlier thread which addresses your problem:-)
hth,
claus
import List (transpose)
u <.> v = summulS u v
a <<*>> b = multMx a (transposeS b)
 where
  multMx Nil _ = Nil
  multMx (u: