From 70aa7b09c29a810a3b81ea58eb23a18b2c421324 Mon Sep 17 00:00:00 2001 From: Alexander Iljin Date: Wed, 18 Jan 2017 13:52:41 +0300 Subject: [PATCH] make-docs: fix what appears to be a oversight --- core/make/make-docs.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/make/make-docs.factor b/core/make/make-docs.factor index ff33790b55..f83f6e0143 100644 --- a/core/make/make-docs.factor +++ b/core/make/make-docs.factor @@ -7,9 +7,9 @@ ARTICLE: "make-philosophy" "Make philosophy" "Make is useful for complex sequence construction which is hard to express with sequence combinators and various combinations of utility words." $nl "For example, this example uses " { $link make } " and reads better than a version using utility words:" -{ $code "[ [ left>> , ] [ \"+\" % center>> % \"-\" % ] [ right , ] tri ] { } make" } +{ $code "[ [ left>> , ] [ \"+\" % center>> % \"-\" % ] [ right>> , ] tri ] { } make" } "compare the above to" -{ $code "[ center>> \"+\" \"-\" surround ] [ left>> prefix ] [ right suffix ] tri" } +{ $code "[ center>> \"+\" \"-\" surround ] [ left>> prefix ] [ right>> suffix ] tri" } "The first one has a similar shape to the eventual output array. The second one has an arbitrary structure and uses three different utilities. Furthermore, the second version also constructs two redundant intermediate sequences, and for longer sequences, this extra copying will outweigh any overhead " { $link make } " has due to its use of a dynamic variable to store the sequence being built." $nl "On the other hand, using " { $link make } " instead of a single call to " { $link surround } " is overkill. The below headings summarize the most important cases where other idioms are more appropriate than " { $link make } "."