input.mjs 207 B

123456789101112
  1. import { isEven } from "./evens";
  2. export function nextOdd(n) {
  3. return isEven(n) ? n + 1 : n + 2;
  4. }
  5. export var isOdd = (function (isEven) {
  6. return function (n) {
  7. return !isEven(n);
  8. };
  9. })(isEven);