Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

LCM function

    ; uses GCD function
    lcm: func [
        {Returns the least common multiple of m and n.}
        m [integer!]
        n [integer!]
    ][
        abs either zero? n [0] [(m * n) / gcd m n]
    ]

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS