From e23883d07eec1dc3eaf011fceadf1e09458a5f04 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 13 Jul 2012 22:11:58 -0700 Subject: [PATCH] strings.tables: fixing issue slicing empty arrays. --- basis/strings/tables/tables.factor | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/basis/strings/tables/tables.factor b/basis/strings/tables/tables.factor index f45a693576..83a1213525 100644 --- a/basis/strings/tables/tables.factor +++ b/basis/strings/tables/tables.factor @@ -17,6 +17,8 @@ IN: strings.tables PRIVATE> : format-table ( table -- seq ) - [ [ string-lines ] map format-row flip ] map concat - flip [ but-last-slice [ format-column ] map! drop ] keep - flip [ " " join ] map! ; + [ [ string-lines ] map format-row flip ] map concat flip + [ { } ] [ + [ but-last-slice [ format-column ] map! drop ] keep + flip [ " " join ] map! + ] if-empty ;