Effect CommunityEC
Effect Community3y ago
3 replies
sign error

Traversing Effect: Converting Record Types with Option Values

How would I do such a traversal in Effect now, since traverse and Applicative are no more:

import { Option as O, ReadonlyRecord as RR } from effect';

const traverse = RR.traverse(O.Applicative);


Basically I want to go from Readonly<Record<string, A>> (1) to Readonly<Record<string, Option<B>>> (2) and finally to Option<Readonly<Record<string, B>>> (3). Only if no None<B> value occured along the way.
Was this page helpful?