factor/library/generic/early-generic.factor

15 lines
378 B
Factor
Raw Normal View History

2005-08-26 23:06:56 -04:00
! Copyright (C) 2004, 2005 Slava Pestov.
! See http://factor.sf.net/license.txt for BSD license.
IN: generic
USING: kernel kernel-internals ;
DEFER: standard-combination
DEFER: math-combination
: delegate ( object -- delegate )
dup tuple? [ 3 slot ] [ drop f ] ifte ; inline
: set-delegate ( delegate tuple -- )
dup tuple? [ 3 set-slot ] [ drop drop ] ifte ; inline