]> gitweb.factorcode.org Git - factor.git/commitdiff
help: sigh sigh $predicate is used by help.lint.checks.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 27 May 2016 00:43:29 +0000 (17:43 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 27 May 2016 00:43:29 +0000 (17:43 -0700)
basis/help/help.factor

index bdd25c0c2f0c2b5ebb216daa2e964906397b7af4..aefae775ffd997309b03b9ed0a86995e63c83f29 100644 (file)
@@ -24,14 +24,15 @@ M: word word-help*
         ] { } map>assoc
     ] bi@ append members \ $values prefix 1array ;
 
-M: predicate word-help*
-    { $values { "object" object } { "?" boolean } }
+: $predicate ( element -- )
+    { { "object" object } { "?" boolean } } $values
     [
-        \ $description ,
         "Tests if the object is an instance of the " ,
-        swap "predicating" word-prop <$link> ,
+        first "predicating" word-prop <$link> ,
         " class." ,
-    ] { } make 2array ;
+    ] { } make $description ;
+
+M: predicate word-help* \ $predicate swap 2array 1array ;
 
 M: class word-help* drop f ;