You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find permutations of a list of (distinct) values. Uses Ramda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As we can see, for any n, the actual output will be [n, n], not [n, -1]
While I have no problem with hand-waving a bit in a mathematical argument for popular consumption,
"as we can see" is really begging the question. If we could simply see this, then we would really
not need to proof by contradiction at all. I think this should be spelled out.
For example, the cardinality of [0, 1, 2, 3, Infinity] is 4, the same as its length.
A recent piece from FiveThirtyEight on [an imaginary primary calendar][pr] for the Democrats got me thinking. There really is no good reason to continue letting Iowa and New Hampshire dictate so much about U.S. elections. Candidates who would otherwise be viable are forced out because of poor showings in these unrepresentative states. And candidates who might otherwise sink are buoyed by winning one of these states.
There is simply no reason for this. Every state should be offered a chance to help with the winnowing of candidates. And yet a national primary day would hurt more than it would help.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This shows how various scenarios play out in terms of Electoral College vote and the states' percentages of those votes. These are based on current apportionment rules against the 2019 Census estimates, with various House sizes of (the current) 435, 1000, and 5000. Note here that Wyoming, which has 0.18 percent of the population would have 0.51 percent of the representation under the current rules, whereas California, with 12.01 percent of the population would have 10.2 percent of the representation. With a 1000-seat House this would change to 0.35 percent and 11.19 percent, respectively. And with a 5000-seat House, they would be 0.21 percent and 11.83 percent.
This does not take into account the [Banzhaf][bz] or [Shapley-Shubik][ss] power indices, which could result in much different anaylses.
| State | Population | Pop % | 435 # | 435 % | 1000 # | 1000 % | 5000 # | 5000 % |
|-------|------------|-------|-------|-------|-------|----
Functional Programming from the perspective of a JavaScript Programmer.
Real World Specification
(aka "Algebraic JavaScript Specification")
This project specifies the behavior of a number of methods that may optionally be added to any object. The motivation behind this is to encourage greater code reuse. You can create functions that just rely on objects having implementations of the methods below, and in doing so you can make them work with a wide variety of different, but related data structures.
Definitions
For the purposes of this, spec, an "entity" is an object that has an [[equivalent]] operation (see bellow) and may implement some or all of the other methods.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters