Argh, still wrong. This is it:

traversable :: Container Maybe a*

cmap :: (Maybe a* -> b) -> Container Maybe a* -> Container b

aggregator :: a* -> b

result :: Maybe Container b

cmap :: (Maybe a* -> b) -> Container Maybe a* -> Container b

aggregator :: a* -> b

result :: Maybe Container b

On Thu, Jun 4, 2020 at 5:06 PM Shiro Kawai <xxxxxx@gmail.com> wrote:

And the return value of maybe-sequence is Maybe Container b.So, the fixed version:(maybe-sequence traversable cmap aggregator) => resulttraversable :: Container Maybe a*

cmap :: (Maybe a* -> Maybe b) -> Container Maybe a* -> Container b

aggregator :: a* -> b

result :: Maybe Container bOn Thu, Jun 4, 2020 at 5:04 PM Shiro Kawai <xxxxxx@gmail.com> wrote:Correction: Cmap's type must be like this:cmap :: (Maybe a* -> b) -> Container Maybe a* -> Container bOn Thu, Jun 4, 2020 at 3:59 PM Shiro Kawai <xxxxxx@gmail.com> wrote:So, borrowing Haskell notation, types of(maybe-sequence traversable cmap aggregator) => resultwould be something like:traversable :: Container Maybe a*cmap :: (Maybe a* -> Maybe b) -> Container Maybe a* -> Container Maybe baggregator :: a* -> bresult :: Maybe Container Maybe b(a* means possibly multiple values. ignore the difference such as currying etc.)I had some difficulty to decode the meaning of "sequenceable" or "traversable" in the spec. It really is any kind of wrapper of type 'F x' on which fmap :: (a -> b) -> F a -> F b is definable.I think "sequence" or "sequenceable" suggests it is some kind of ordered set of elements, and too limiting for what the argument actually is. "Traversable" seems broader, not so strict about the order, but still suggests collection of multiple values. It is logically true that a single-value container is still traversable, but can be misleading.Ideally we define all those abstract terms first, but in practice I guess they will emerge after many specs and implementations. At this moment, I think "container" or "wrapper" reflects what the function actually does.