Practical numbers: Difference between revisions
Content added Content deleted
(→Composition of pure functions: removed version with Haskell type comments instead of Python type comments) |
(→{{Header|Python}}: No Haskell!) |
||
Line 228: | Line 228: | ||
===Composition of pure functions=== |
===Composition of pure functions=== |
||
===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''' |