(* 
 * LU
 *
 * [L,U] decomposition of matrix written as single function.
 * This function is functionally identical to [L,U]
 *)

DEF LU AS
   IF Singleton THEN [#<<1.0>>,id]        (* definition of L *)
   ELSE 
      [
         Li1,
         Aik | [EACH #0 END,LU],
	 U1k
      ] | 
      [
	 [
	    1,
	    2 | [1,2|1] | apndl
	 ] | ApndlCol,
	 [
	    3,
	    2 | [1,2|2] | ApndlCol
	 ] | apndl
      ]
   END;
