On 19/09/05, Luke Palmer <[EMAIL PROTECTED]> wrote: > Part 1: fmap > > I have a plan for the $x »+« $y form (and also foo(»$x«, »$y«, »$z«)), > but I don't want to go into that right now. It basically involves > zipping the structures up into tuples and applying the function to the > tuples.
Does this mean that 'unary' (one-side) hyper would be structure-preserving, but 'binary' (two-side) hyper would not? Or would you take the final list of tuples and re-build a structure? I guess it comes down to whether you want to allow binary-hyper on values that aren't structurally equivalent. Either you flatten both structures to lists (which might be semantically dubious), or you disallow binary-hyper on structurally distinct arguments (which might prohibit some useful operations). Or you do something inconsistent. (Have you written any of these deep details up somewhere? I'd love to read them.) > Part 2: Junctions > > So my proposal is to make a Junction into a plain old Functor. So > what used to be: > > if any(@values) == 4 {...} > > Is now: > > if any(@values) »== 4 {...} > > And the only thing that makes junctions different from Sets (which are > also Functors) is their behavior in boolean context (and their ability > to be Patterns; see below). I think this is really nice: we get rid of invisible junction magic, yet accessing that magic explicitly is only one or two characters away. Being able to pass junctions around as values (safely) is a nice bonus too. Stuart