Using fp-ts. I have an option of an array
const arrayofKeys: Option<Array<K>>,
and an option of a record
const record: Option<Record<K,V>>
I want to pick the Vs of the Record where Ks intersect with the Array and stick the result in an Option.
In ramda: R.pick(arrayOfKeys, record)
How do i solve this with fp-ts or other packages within the fp-ts ecosystem?
Ramda's
liftlifts a function on some values to work on a container of those values. Solift (pick)will likely do what you want, so long as fp-ts'sOptionsupports the FantasyLand Apply specification.