Author: | erg |
---|---|
Mode: | factor |
Date: | Fri, 5 Apr 2013 19:17:08 |
: basis-vector ( row col# -- ) [ clone ] dip [ swap nth neg recip ] 2keep [ 0 spin set-nth ] 2keep [ n*v ] dip matrix get set-nth ; : basis-vector ( col# row -- ) clone { [ nth neg recip ] [ [ 0 ] 2dip set-nth ] [ n*v ] } 2cleave matrix get set-nth ;