Perfect numbers: Difference between revisions

m
(→‎Functional (faster version): Updated primitives, tidied.)
Line 2,344:
# p :: Int -> Bool
def p(x):
'Factor of n. ?'
return 0 == (n % x)
 
Line 2,377:
'''Concatenated list over which a function has been mapped.
The list monad can be derived by using a function f which
wraps its output a in list,
(using an empty list to represent computational failure).'''
return lambda xs: list(
9,655

edits