Skip to content

Instantly share code, notes, and snippets.

@maxehnert
Created June 22, 2016 05:04
Show Gist options
  • Save maxehnert/542d6117751f2736c3408b73ab855b17 to your computer and use it in GitHub Desktop.
Save maxehnert/542d6117751f2736c3408b73ab855b17 to your computer and use it in GitHub Desktop.
es6 cyclic dependency subtract.js
import { countAddPre, add } from './add';
export var countSubtract = 0;
export function subtractfn(n = 0) {
countSubtract++;
console.log('countSubtract', countSubtract);
if (n < 20) return add(n + 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment