30 lines
452 B
Text
30 lines
452 B
Text
include ..\Utilitys.pmt
|
|
|
|
def add + enddef
|
|
def sub - enddef
|
|
def mul * enddef
|
|
def div / enddef
|
|
|
|
def opVect /# a b op -- a b c #/
|
|
var op
|
|
list? not if swap len rot swap repeat endif
|
|
len var lon
|
|
|
|
( lon 1 -1 ) for var i
|
|
i get rot i get rot op exec >ps swap
|
|
endfor
|
|
|
|
lon for drop
|
|
ps>
|
|
endfor
|
|
|
|
lon tolist
|
|
enddef
|
|
|
|
( 5 7 ) ( 2 3 )
|
|
|
|
getid add opVect ?
|
|
getid sub opVect ?
|
|
drop 2
|
|
getid mul opVect ?
|
|
getid div opVect ?
|