Thu Aug 13 14:45:10 EDT 2015

Not getting it

I keep running into functions like:

   i -> m o

Where m really is just [] or Stream, but I can't have the semantics of
the List monad (= flattening).

In the language, m really just expresses:
- compilability (representability)
- sharing (or strictness)

There are two monads I'm confusing:

- One just does sharing (scalar)
- The other implements the sequence semantics

This is especially clear in:

class Monad m => StateFold m s where
  stateFold :: s -> (s -> m (s, t)) -> m t

The first m is the 'scalar' monad.  The other is a representation of a
sequence.  Maybe this should be made into:

class (Monad m, Applicative m) => StateFold m a s where
  stateFold :: s -> (s -> m (s, t)) -> m (a t)

where a captures the sequence part.


What StateFold expresses is not really a fold.  It expresses that we
are part of a context that expresses that the state can be ignored

It actually means something like:

Take this initial value and scalar function and abstract away the time
component such that we can focus on composing and sharing the current

Smells like comonad?

Another vaguification:

You know, this got an s that you can't touch, but hey just take it off
with this here.