mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
13 lines
198 B
Text
13 lines
198 B
Text
|
# example|GreatestCommonDivisor
|
||
|
|
||
|
Declare module constant (prevents reloading when using `import`):
|
||
|
|
||
|
````
|
||
|
:example|GreatestCommonDivisor ;
|
||
|
````
|
||
|
|
||
|
````
|
||
|
:gcd (ab-n)
|
||
|
[ tuck mod dup ] while drop ;
|
||
|
````
|