retroforth/package/extensions/double.retro
crc f7310bb6cc move malloc & double to package/extensions
FossilOrigin-Name: 072c6e6b0eb0f21ce985d84fc8c5f032172e3116ec765c61d85fb60aa3ff74d4
2023-10-23 18:23:23 +00:00

19 lines
356 B
Forth

~~~
:double:var (nns-)
d:create swap , , ;
:double:fetch (a-nn)
fetch-next swap fetch ;
:double:store (nna-)
&swap dip store-next store ;
:double:const (nns-)
double:var &double:fetch does ;
:double:swap (nnmm-mmnn)
rot push rot pop ;
:double:dip (mnq-mn) rot rot push push call pop pop ;
:double:sip (mnq-mn) &dup-pair dip double:dip ;
~~~