0
嗯......当为任何大于3的整数求值时,为什么函数以无限循环结束?递归Haskell函数中的无限循环
smallestMultiple n = factors [2..n] where
factors [] = []
factors (h:xs) = h:(factors $ filter ((<)1) [div x h|x<-xs])
where
div x y
|x `mod` y ==0 = x `div` y
|otherwise = x
哦....这很有道理。谢谢 – Julio 2015-02-09 20:32:30