Hello,

Custom constructors defined via C: sometimes seem clumsy. Maybe using 'make' 
could help in some cases. Here's the piece constructor in 
tetris-piece.factor :

C: piece ( tetromino -- piece )
    [ set-delegate ] keep
    0 over set-piece-rotation
    { 0 0 } over set-piece-location ;

It's a one-liner with make:

C: piece ( tetromino -- piece ) drop
[ piece , , 0 , { 0 0 } , ] { } make >tuple ;

Ed

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to