You can treat a Map as a Function1, which does work. Or you could
manually encode your own "infset" using Either if you wanted. But
On Fri, Dec 05, 2014 at 11:32:28AM -0500, Tom Switzer wrote:
> Yeah, unfortunately I think Map's withDefaultValue is too weird to be
> reliable. It only works when you treat Map like a function and none of the
> other map methods really support it.
>
> I think you are stuck with creating a special type, like infset, to deal
> with this, since you'll need to restrict the interface to deal with the
> infinite nature of the type.
>
> You may also be interested in the latest vector space refactor PR, which
> introduces the concept of a basis, and may make the map operations easier
> to implement:
https://github.com/non/spire/pull/334
>
> On Fri, Dec 5, 2014 at 11:07 AM, Alec Zorab <
alec...@gmail.com> wrote:
>
> > All,
> >
> > I feel as though it should be the case that we can provide a boolean
> > algebra for maps of bools. That said I'm finding it hard to actually write
> > it, primarily because the Map interface has a slightly odd on-off
> > relationship with default values.
> >
> > I've created a rough sketch here [1]