3 ms·
Without being too knowledgeable on the topic, but with a little math background - you'd need a bijective function to that. On a quick search for bijective lense
by random3 6y ago
Without being too knowledgeable on the topic, but with a little math background - you'd need a bijective function to that. On a quick search for bijective lenses https://arxiv.org/abs/1710.03248 https://arxiv.org/abs/1710.03248
- pvh 6y agoClose! In math lingo, you can only have a bijective function for domains with equal cardinality. In other words, you couldn't have a bijective function between an integer and a boolean, because there are fewer possible boolean values than integer values. Demanding bijective functions is probably more restrictive than you want to be for building real-world systems. We discuss this a bit in the paper -- I think look for "convert".
- random3 6y agoThank you! I guess in absence of that, the lens is the codomain so to speak so must retain the info. Will read when I get a chance :)