Practical numbers: Difference between revisions
Content added Content deleted
(→Composition of pure functions: Restored the deleted original, expressed thanks for the addition of a variant for comparison.)) |
|||
Line 229: | Line 229: | ||
===Composition of pure functions=== |
===Composition of pure functions=== |
||
====Original version – with language-independent (MH) comments on type semantics==== |
====Original version – with language-independent (MH) comments on type semantics==== |
||
A variant of this code with '''actual Python type hints for the compiler''', in lieu of the language-independent Hindley-Milner type comments for the reader shown here has been helpfully added below, by another user (who objected that my comments looked too much like Haskell), for comparison. |
A variant of this code with '''actual Python type hints for the compiler''', in lieu of the language-independent Hindley-Milner type comments for the reader shown here, has been helpfully added below, by another user (who objected that my comments looked too much like Haskell), for comparison. |
||
For example, where an MH type comment (for the central function below) reads: |
For example, where an MH type comment (for the central function below) reads: |