Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Recursive Matrix Multiplication

Name: Anonymous 2010-07-08 0:58

I'm trying to figure out how to code a recursive matrix multiplication algorithm. Could someone please post pseudo-code.

Name: Anonymous 2010-07-08 1:18

>>4
{-# OPTIONS -fglasgow-exts #-}

import Data.List

class BuildList a r | r-> a where
    build' :: [a] -> a -> r

instance BuildList a [a] where
    build' l x = reverse $ x:l

instance BuildList a r => BuildList a (a->r) where
    build' l x y = build' (x:l) y

build :: BuildList a r => a -> r
build x = build' [] x

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List