Last active
March 14, 2016 00:35
-
-
Save Lucretiel/46fd06dee0d9d3315a4b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//Global Data example | |
function load_problem(tokens) { | |
global_data = get_global_data(tokens) | |
return global_data.num_cases, function(tokens) { | |
case_specific_data = get_case_data(tokens) | |
return function() { | |
// Do a bunch of math with global_data and case_specific_data | |
return solution | |
} | |
} | |
} | |
//No global data | |
function load_case(tokens) { | |
case_specific_data = get_case_data(tokens) | |
return function() { | |
//Do a bunch of math | |
return solution | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment