| Semantics: (with (x 3 y 4)
(shift x y 5)
(list x y)) ; => (4 5)
Among other benefits, we can now build rotate in terms of shift: (mac rotate places
(w/uniq tmp
`(let ,tmp ,car.places
(shift ,@places ,tmp))))
(and of course we could always build swap in terms of rotate) (mac swap(x y)
`(rotate ,x ,y))
If people like this I'll put it in anarki in a day or two. Here's what it looks like in wart: http://github.com/akkartik/wart/commit/2299ca5f0f |