From d835fd8b8291790a60481836ead0a71619369093 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 26 Dec 2017 15:45:35 -0800 Subject: [PATCH] present: add a ``M\\ callable present`` --- core/present/present.factor | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/present/present.factor b/core/present/present.factor index eae0f43021..5af80987fe 100644 --- a/core/present/present.factor +++ b/core/present/present.factor @@ -1,7 +1,7 @@ ! 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 ; +quotations sequences strings vocabs words ; IN: present GENERIC: present ( object -- string ) @@ -27,3 +27,10 @@ M: effect present effect>string ; M: f present drop "" ; M: pathname present string>> ; + +M: callable present + [ "[ ]" ] [ + [ drop "[ " ] + [ [ present ] map " " join ] + [ drop " ]" ] tri 3append + ] if-empty ; \ No newline at end of file