Closures and Functions

Wrap and reshape functions with closures: run once, memoise, curry, debounce and throttle.

  1. 01

    Run a Function Only Once

    • easy
    • Code
  2. 02

    Run After N Calls

    • easy
    • Code
  3. 03

    Counter with Private State

    • easy
    • Code
  4. 04

    Compose and Pipe Functions

    • easy
    • Code
  5. 05

    Spy on a Function

    • medium
    • Code
  6. 06

    Memoize a Function

    • medium
    • Code
  7. 07

    Write Your Own Bind

    • medium
    • Code
  8. 08

    Curry a Function

    • medium
    • Code
  9. 09

    Partial Application with Placeholders

    • medium
    • Code
    • Pro
  10. 10

    Debounce a Function

    • medium
    • Code
  11. 11

    Throttle a Function

    • hard
    • Code
    • Pro
  12. 12

    Memoize an Async Function

    • hard
    • Code
    • Pro