Skip to content

Instantly share code, notes, and snippets.

@grossvogel
Last active May 17, 2019 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grossvogel/20d56c009bb6d8906dce088c3bedb628 to your computer and use it in GitHub Desktop.
Save grossvogel/20d56c009bb6d8906dce088c3bedb628 to your computer and use it in GitHub Desktop.
const shrink = polynomial => {
const arrayShrinker = jsc.shrink.array;
const arrayIntShrinker = arrayShrinker(jsc.integer.shrink);
const coefficientSets = arrayIntShrinker(polynomial.coefficients);
return coefficientSets.map(Polynomial.create);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment