Evaluate binomial coefficients: Difference between revisions

→‎Functional: Removed some pre-biasing from call for comparison.
(→‎Functional Python: Used mypy to test the type hints suggested in Donalds variant. Found and fixed some further errors in them.)
(→‎Functional: Removed some pre-biasing from call for comparison.)
Line 1,950:
[1, 5, 10, 10, 5, 1]</pre>
 
Alternatively, compare comments for the reader (above) with the type hints for the compiler in a derived variant submitted below.
 
Alternatively, compare comments for the reader (above) with the type hints for the compiler in a derived variant submitted below.
 
Type hints can be useful for tracking problems in larger and more complex projects, but are probably overkill at this level of scale, and are less legible, and semantically less informative, than the Hindley Milner style comments above, which are widely used with pure functional code across a variety of different languages and libraries. Use of Hindley Milner style type comments (as above) also facilitates Rosetta comparison of the implementation of equivalent functions across languages including Haskell, Javascript, Python and AppleScript.
 
<lang python>from typing import (Callable, List, Any)
Anonymous user