: det ( matrix -- x ) dup 33matrix? not [ not-33matrix ] [ { [ [ { 0 4 8 } ] dip nths product ] [ [ { 1 5 6 } ] dip nths product ] [ [ { 2 3 7 } ] dip nths product + + ] [ [ { 0 5 7 } ] dip nths product ] [ [ { 1 3 8 } ] dip nths product ] [ [ { 2 4 6 } ] dip nths product + + - ] } cleave ] if ;