Commits

Anonymous committed 521a71b Merge

Merged default (8320cfc18df9) into default (bcc135950ad0)

Comments (0)

Files changed (1)

+(*
+ * Bike for matrix
+ *)
+module Matrix =
+	struct
+		type 'a mtrx = 'a list list
+		let (sizeof: 'a mtrx -> int * int ) = function x ->
+			let rec sizeL = function
+				[] -> 0 |
+				x::xs -> (+) 1 (sizeL xs) in
+			(sizeL x, sizeL (List.hd x))
+		let (sum: mtrx -> mtrx -> mtrx) = fun x y -> (* OMGWTF BUG BUG BUG *)
+			let rec loop = function
+				[] -> 0 |
+				x::xs -> List.map (+) (loop xs) in
+			loop (loop x)
+	end;;