On Thu, 16 Apr 2009 11:16:12 -0300
Bruno Deferrari <[email protected]> wrote:

> And now that we are at it, integers as sequences can be confusing too
> (like in your example, 0 matches because it is the first element of
> the CHAR: a sequence, matches as the key and 1 being the second
> matches as the value), is that necessary now that factor has ranges?

Well, I'm thoroughly confused already by my string example. I have
not yet really thought about the sequenciability of integers...

On the one hand, "abc" seems to be interpreted as an association with
three keys: "abc" keys    -> { 0 0 0 }
On the other hand, requesting a value for one such key yields something
obviously not contained in the association.
On the third hand: Does any of the available assoc implementations actually
support multiple usages of the same key?

What I'd have expected of an assoc-conforming string, would be
access to its characters: 2 "abc" at   -> either b or c

s.

> 
> On Thu, Apr 16, 2009 at 11:11 AM, Bruno Deferrari <[email protected]>
> wrote:
> > I may be wrong, but I think that sequence is an instance of assoc to
> > make alists work (look at the definition of at*). But yeah, I don't
> > like how interacts with sequences in general.
> >
> > On Thu, Apr 16, 2009 at 10:35 AM, Stefan Schmiedl <[email protected]> wrote:
> >> Recently on #concatenative
> >>
> >> [14:40]  <swsch> What am I doing wrong:  H{ { "a" 1 } } "a" at .
> >> ---> f [14:41]  <tizoc> swsch: "a" goes before H{ ... }
> >> [14:42]  <tizoc> at's stack effect is ( key assoc  -- value/f )
> >> [14:48]  <swsch> so ... I'm being stupid, that's ok
> >> [14:48]  <swsch> why does "a" implement assoc-protocol?
> >> [14:57]  <swsch> ah ... INSTANCE: sequence assoc  does it
> >> [14:58]  <swsch> but a string is a somewhat strange assoc ...
> >> "abc" keys   --> { 0 0 0 } [15:00]  <swsch> and even funnier   0
> >> "abc" at  -> 1 ... what's the idea behind that?

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to