! Copyright (C) 2008, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors effects io.pathnames kernel math math.parser
-sequences strings vocabs words ;
+USING: accessors alien.c-types effects io.pathnames kernel math
+math.parser quotations sequences strings vocabs words ;
IN: present
GENERIC: present ( object -- string )
M: f present drop "" ;
M: pathname present string>> ;
+
+M: callable present
+ [ "[ ]" ] [
+ [ drop "[ " ]
+ [ [ present ] map " " join ]
+ [ drop " ]" ] tri 3append
+ ] if-empty ;
+
+M: pointer present
+ to>> name>> "*" append ;