Paste: adsoda cleanup

Author: erg
Mode: factor
Date: Fri, 5 Apr 2013 19:17:08
Plain Text |
: 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 ;

New Annotation

Summary:
Author:
Mode:
Body: