MasterBy

Engineering

Learn TypeScript Functional Programming in 10 weeks

Week by week

Duration
10 weeks
Phases
4
Topics
8
Tasks
18

Goal: Write TypeScript in a functional style: pure functions, immutable data, typed errors and composable pipelines.

  1. 1. Foundations

    Weeks 1–3

    Pure functions and immutability

    • Refactor three functions with side effects into pure ones
    • Replace mutation with readonly types and spread updates
    • Explain referential transparency in your own words

    Higher-order functions

    • Implement map, filter and reduce from scratch
    • Write a typed compose and pipe

    Algebraic data types

    • Model a domain with discriminated unions
    • Use exhaustive switch with a never check
  2. 2. Effects as values

    Weeks 4–6

    Option and Result

    • Implement Option with map and flatMap
    • Replace thrown errors in one module with Result

    Async pipelines

    • Wrap a fetch call in a typed TaskEither
    • Run independent requests in parallel and collect errors
  3. 3. Type-level programming

    Weeks 7–8

    Generics and inference

    • Write a generic function that infers from its arguments
    • Constrain a generic with extends and keyof

    Conditional and mapped types

    • Build DeepReadonly with a mapped type
    • Extract event payload types with infer
  4. 4. Capstone

    Weeks 9–10

    Functional core, imperative shell

    • Split a small CLI into a pure core and an IO shell
    • Cover the core with property-based tests
    • Write a one-page design note on the trade-offs

Be first to know when MasterBy launches

Leave your email — one message at launch, nothing else.