Created
October 9, 2018 20:31
-
-
Save richardvanbergen/8a083b8e838e9f81d2d62ef67af380ab to your computer and use it in GitHub Desktop.
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
exports.default = complete(grid) => { | |
// not really necessary but not a negative either, this function can just be init code at the top | |
createGrid = createGrid() => {} | |
// again, this function can be init code if you want it to be, not important | |
identifyMissing = identifyMissing() => {} | |
// now you don't have to pass around `grid` all the time, your functions aren't as pure but this isn't really | |
// a functional programming style anyway and it's fine in this instance to be honest | |
availableRow = availableRow(row, num) => {} | |
availableCol = availableCol(col, num) => {} | |
availableSquare = availableSquare(col, row, num) => {} | |
availableAll = availableAll(col, row, num) => {} | |
iterateNums = iterateNums(missingNums) | |
return iterateNums(grid, missingNums) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment