...

/

Solution Review: Using Sequence in Function

Solution Review: Using Sequence in Function

Look at the solution to the coding challenge where we are asked to use a Sequence in a

We'll cover the following...

Solution

Press + to interact
const application = (airplane: Airplane) => {
return pipe(
eitherSequence(
checkEnoughCrew(airplane),
checkEnoughFuel(airplane),
checkNotOnFire(airplane)
),
E.map((res: Airplane[]) => res[0]),
);
};
console.log(application({crew:5,fuel:6,onFire:true}));

Explanation

...