Is there widely-accepted terminology for the possible things you could see from the inside of a given Functor, Applicative, or Monad? Examples of what I mean for some different ones:
- Identity: The _______ of
Identity "abc"
is["abc"]
- Writer: The _______ of
(["log entry one", "log entry two"], 42)
is[42]
- Maybe: The _______ of
Nothing
is[]
- Maybe: The _______ of
Just True
is[True]
- ZipList: The _______ of
ZipList [1,2,3]
is[1,2,3]
- Non-determinism: The _______ of
[1,2,3]
is[1,2,3]
- Reader: The ________ of
\x -> if x then 123 else 456
is[123,456]
- IO: The ________ of
getContents
is all Strings
Semi-formally, I mean the smallest xs
for some given m
for which ((`elem` xs) <$> m) == (True <$ m)
.
Here’s the actual context I want to use the word in:
The ________ of
traverse (\x -> ZipList [x+10, x+20]) [1,2,3]
is just[[11,12,13],[21,22,23]]
, but the ________ oftraverse (\x -> [x+10, x+20]) [1,2,3]
also contains[11,22,13]
and several other lists that don’t preserve monotonicity.