Factors of an integer: Difference between revisions
m
→AppleScript :: Functional: Tidied
m (→AppleScript :: Functional: Tidied) |
|||
Line 527:
if n = 1 then
{1}
else if n = 0 then
{0, 1}
else if 0 > n then
missing value
else
set realRoot to n ^ (1 / 2)
Line 555 ⟶ 559:
end integerFactors
on run
Line 564 ⟶ 568:
-- enumFromTo :: Int -> Int -> [Int]
|