Practical numbers: Difference between revisions

Content added Content deleted
(→‎Composition of pure functions: Removed argument with note to see taslk page.)
Line 228: Line 228:


===Composition of pure functions===
===Composition of pure functions===
On Haskell vs Python typing see the discussion page.
On type comments vs compiler hints see the discussion page.
<lang python>'''Practical numbers'''
<lang python>'''Practical numbers'''


Line 248: Line 248:
))
))



# Note: Although mypy compliant, type Any below could be improved.


def sumOfAnySubset(xs: List[int]) -> Callable[[Any], Any]:
def sumOfAnySubset(xs: List[int]) -> Callable[[Any], Any]: