codex-lv3-may-2025

Level Navigation: 1 (2ℹ️) 3 4 5 6 (7ℹ️) (8ℹ️) (9ℹ️) 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 (37ℹ️) 38⚡ 39⚡ 40⚡ 41⚡ 42 43⚡ 44⚡ 45 46 (47ℹ️)

Level 44 (Challenge): Choose Your Own Function Cluster

Now it’s your turn! Choose one of the function clusters from function-ideas.md and build them out.

Available clusters:

Your task:

  1. Choose a cluster that interests you
  2. Build each function in the cluster:
    • Write tests first (red)
    • Implement the function (green)
    • Test edge cases
  3. Compose them into at least one larger function that uses multiple functions from your cluster
  4. Document your functions with clear input/output examples

Example workflow:

// Step 1: Build individual functions
function calculateTip(total, percent) { /* ... */ }
function applyDiscount(price, discount) { /* ... */ }

// Step 2: Compose them
function calculateFinalPrice(price, discount, tipPercent) {
  const discounted = applyDiscount(price, discount);
  return calculateTip(discounted, tipPercent);
}

Try it: Pick a cluster and build it out! Write tests, implement functions, and compose them together.