Hi Bruno,

I'm sorry If I have induced you into error, but I did not understand the question in 
the proper way... 

If you want to map a series of values to-from, then liquid isn't really the thing to 
use... I thought you meant to keep a synchronisation between to entities... so that  a 
change in one repercutes as a change to the other...

But, just using select a reverse on a series, makes it map one value to another, if 
you want to map the other way, you need to use reverse (but, of course, you need to 
know the direction of the search):

list: ["a" 1 "b" 2 "c" 3]

select list "b"
==2

select (head reverse copy list) 2
==
"b"

note that the parentheses aren't necessary, I just added them to increase readability. 
 I've read that they can affect performance, so they should be removed when used in 
real code.

HTH

-MAx
---
"You can either be part of the problem or part of the solution, but in the end, being 
part of the problem is much more fun."
 

> -----Original Message-----
> From: Maxim Olivier-Adlhoch 
> Sent: Monday, November 03, 2003 11:53 AM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Re: Bidirectional value mapping.
> 
> 
> 
> liquid.
> 
> that is its main purpose.  it is also linked to vid via liquid-vid.
> 
> development has slown down for a few weeks, but it'll pick up.
> http://www.rebol.it/~steel
> a working version and some documentation can be found here: 
> http://www.rebol.it/~steel
> for an understanding of liquid itself, you should test out 
> liquid-vid.  90% of it is a direct extension of liquid 
> (concept, nomenclature, functioning, etc).
> 
> you can validate data localy to each but the actual storage 
> is shared.  if you really want to could create a container, 
> which actually stores a copy of the value locally to an 
> object (in an altered state?).
> 
> HTH
> 
> ciao!
> 
> -MAx
> -------------
> Steel project coordinator
> http://www.rebol.it/~steel
> ------------- 
> > -----Original Message-----
> > From: Bruno G. Albuquerque [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 03, 2003 12:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: [REBOL] Bidirectional value mapping.
> > 
> > 
> > 
> > Hello.
> > 
> > I have 2 values that would be mapped to each other. What I 
> > need to do is
> > to be able to find the first valeu by searching for the ceond 
> > and locate
> > the second by searching for the first. I did come up with 
> solutions to
> > that but I am not satisfied with any of the solutions. Is 
> > there a standard
> > Rebol-Way ofr doing that? The best option would be a way that 
> > would not
> > result in data duplication.
> > 
> > -Bruno
> > 
> > 
> > 
> > -- 
> > To unsubscribe from this list, just send an email to
> > [EMAIL PROTECTED] with unsubscribe as the subject.
> > 
> > 
> 
> -- 
> To unsubscribe from this list, just send an email to
> [EMAIL PROTECTED] with unsubscribe as the subject.
> 
> 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to