[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: More functional thoughts (Was: vectors and Lua)
- From: RLake@...
- Date: Mon, 30 Jun 2003 12:13:19 -0500
... premature send syndrome ... I meant to say:
With an explict compose operator, the syntax could be a lot cleaner:
xform = addPoint(centre) # rotateBy(math.pi / 4)
# scaleBy(2) # subtractPoint(centre)
Or using | for reverse-compose, perhaps more familiar:
xform = subtractPoint(centre) | scaleBy(2)
| rotateBy(math.pi / 4) | addPoint(centre)
Unfortunately, this operator does not exist in Lua :(
R.