[pure-lang-users] Bug with list comprehensions
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-08-20 22:03:53
|
> using math; > let x = [1+:2, 1%4]; > [(i,j); i=x; j=x]; [(0+:1,1+:2),(0+:1,1L%4L),(0+:1,1+:2),(0+:1,1L%4L)] As if this weren't weird enough, if you type this in right after > let y = [1%2, 3%4]; > [(i,j); i=y; j=y] [(0+:1,1L%2L),(0+:1,3L%4L),(0+:1,1L%2L),(0+:1,3L%4L)] Note that > let x = [1%2, 3%4]; > [(j,k); j=x; k=x]; [(1L%2L,1L%2L),(1L%2L,3L%4L),(3L%4L,1L%2L),(3L%4L,3L%4L)] Works. So my guess is that the constant i defined in math.pure is getting mixed up with the i in [(i,j); i=x; j=x]; e.r. |