[clean-list] how to disambiguate records in a list comprehension ?

Arjen A.vanWeelden at cs.ru.nl
Sun Apr 29 12:36:50 MEST 2007


Use <expression>.<record type name>.<field> to disambiguate record field 
selections (anywhere). In this case: r.R1.id

Isaac Gouy wrote:
> Error [example.icl,4,comprehension]: id ambiguous selector specified
> 
> 
> Start = [r \\ r <- rs | r.id == 3]
> 
> :: R1 = {id :: Int}
> :: R2 = {id :: Int, value :: Int}
> 
> rs = [{R1|id=0}, {R1|id=2}, {R1|id=3}, {R1|id=4}, {R1|id=5}]
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> clean-list mailing list
> clean-list at science.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/clean-list


More information about the clean-list mailing list