Paste: pseudocode for new new-accessors

Author: erg
Mode: factor
Date: Fri, 12 Jun 2009 17:53:41
Plain Text |
TUPLE: foo a b c ;
CONSTRUCTOR: foo ( a b c -- obj ) ;

KEEP: a
GET: a
SET: a
SET-LEFT: a
SET-RIGHT: a
SET-LEFT-KEEP: a
SET-RIGHT-KEEP: a

GET: { a b c } -> [ [ a>> ] [ b>> ] [ c>> ] tri ] -> [ class '[ _ offset-by-name slot ] map firstn ] 

SET: { a b } -> [ swap >>b swap >>a ] -> [ class [ swap offset-by-name set-slot ] [ swap offset-by-name set-slot ] bi ]

KEEP: { a b c } -> [  [   [ a>> ] [ b>> ] [ c >> ] tri  ] keep ]  -> [ ... ]

New Annotation

Summary:
Author:
Mode:
Body: