Trying to simply insert some element at specific index using insertAt util function from fp-ts but insertAt returns Option<T[]> | NonEmptyArray which returns object like
const x = insertAt(1, 100)([0, 10]) => { _tag: "someTag", value: [0, 100, 10] }
and I can't just print x.value because Option or NonEmptyArray type have no 'value' key. How can I get access to the whole array to for example render it in a view? How can I iterate through them? fp-ts documentation gives me absolutely 0 knowledge about how it works.