Practical numbers: Difference between revisions
Content deleted Content added
m Yet more vandalism cleaned up. This is not what Rosetta Code is where. Where we diverge, we enrich the sight with alternative versions |
|||
Line 428: | Line 428: | ||
666 is practical :: True</pre> |
666 is practical :: True</pre> |
||
===Semantic type comments replaced by compiler type hints=== |
|||
Note the prominence here of the '''Callable''' type symbol, and the loss of specificity for the reader, in the uses of the '''Any''' type symbol. |
|||
Semantic clarity for the human reader could be improved by restoring the informal – but cleaner, and more informative – type comments which this version deletes from the original version above. |
|||
For example, this version replaces an informative type comment: |
|||
'''sumOfAnySubset :: [Int] -> Int -> Bool''' |
|||
with a noisier, (but, for the human reader, less informative) compiler hint: |
|||
'''List[int]) -> Callable[[Any], Any]''' |
|||
<lang python>'''Practical numbers''' |
<lang python>'''Practical numbers''' |