183c5bae38
FossilOrigin-Name: d2b8467883db80cb179089e1db1b1ed4dff1f11b4bee7086ee46d83f3ee0136e
12 lines
198 B
Forth
12 lines
198 B
Forth
# example|GreatestCommonDivisor
|
|
|
|
Declare module constant (prevents reloading when using `import`):
|
|
|
|
````
|
|
:example|GreatestCommonDivisor ;
|
|
````
|
|
|
|
````
|
|
:gcd (ab-n)
|
|
[ tuck mod dup ] while drop ;
|
|
````
|