Search⌘ K

Solution Review: Working with Flow

Understand how to use the flow function in fp-ts for building and enriching data objects step-by-step. This lesson guides you through creating a person object and adding properties like age and country, helping you manage complex functional workflows in TypeScript effectively.

We'll cover the following...

Solution

TypeScript 3.3.4
const application = (name: string): PersonWithAgeAndCountry => {
return flow(
buildBasicPerson,
enrichWithAge,
enrichWithCountry,
)(name);
};
console.log(application("Ali"));

Explanation

...