From: John Benediktsson Date: Thu, 18 Mar 2021 19:16:52 +0000 (-0700) Subject: regexp.classes: rename substitute to (substitute). X-Git-Tag: 0.99~2438 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=f245d44bc9c4421e6cdf6343ba2747cee29fe2d6 regexp.classes: rename substitute to (substitute). --- diff --git a/basis/regexp/classes/classes.factor b/basis/regexp/classes/classes.factor index 464f8c03de..7cce32ecfa 100644 --- a/basis/regexp/classes/classes.factor +++ b/basis/regexp/classes/classes.factor @@ -141,7 +141,7 @@ TUPLE: and-class { seq read-only } ; M: and-class class-member? seq>> [ class-member? ] with all? ; inline -DEFER: substitute +DEFER: (substitute) : flatten ( seq class -- newseq ) '[ dup _ instance? [ seq>> ] [ 1array ] if ] map concat ; inline @@ -188,7 +188,7 @@ TUPLE: class-partition integers not-integers simples not-simples and or other ; : answer-ors ( partition -- partition' ) dup [ not-integers>> ] [ not-simples>> ] [ simples>> ] tri 3append - '[ [ _ [ t substitute ] each ] map ] change-or ; + '[ [ _ [ t (substitute) ] each ] map ] change-or ; : contradiction? ( partition -- ? ) { @@ -219,7 +219,7 @@ TUPLE: class-partition integers not-integers simples not-simples and or other ; : answer-ands ( partition -- partition' ) dup [ integers>> ] [ not-simples>> ] [ simples>> ] tri 3append - '[ [ _ [ f substitute ] each ] map ] change-and ; + '[ [ _ [ f (substitute) ] each ] map ] change-and ; : tautology? ( partition -- ? ) { @@ -291,12 +291,12 @@ M: or-class answer M: not-class answer [ class>> ] 2dip answer ; -GENERIC#: substitute 1 ( class from to -- new-class ) -M: object substitute answer ; -M: not-class substitute [ ] bi@ answer ; +GENERIC#: (substitute) 1 ( class from to -- new-class ) +M: object (substitute) answer ; +M: not-class (substitute) [ ] bi@ answer ; : assoc-answer ( table question answer -- new-table ) - '[ _ _ substitute ] assoc-map sift-values ; + '[ _ _ (substitute) ] assoc-map sift-values ; : assoc-answers ( table questions answer -- new-table ) '[ _ assoc-answer ] each ;