You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
modify and modifyF of traversals both cannot change the type of the value. A more general function is needed.
Scenario
For example, I'm building a blog and I have a slug to some other content collection inside of a list field of a collection item. GetXXXBySlug returns Option<T> and I want the Option to wrap the entire object, and T at the same time not a string.
It requires me to perform a wrapping of a side-effect while also changing the type of the value from string to T.
I'm wondering if there're some good workarounds using sequence or something, but I can't figure it out because the field is very deep in the structure.
The text was updated successfully, but these errors were encountered:
modify
andmodifyF
of traversals both cannot change the type of the value. A more general function is needed.Scenario
For example, I'm building a blog and I have a slug to some other content collection inside of a list field of a collection item.
GetXXXBySlug
returnsOption<T>
and I want theOption
to wrap the entire object, andT
at the same time not astring
.It requires me to perform a wrapping of a side-effect while also changing the type of the value from
string
toT
.Example
Change
into
by using a function with the signature
I'm wondering if there're some good workarounds using
sequence
or something, but I can't figure it out because the field is very deep in the structure.The text was updated successfully, but these errors were encountered: