]> gitweb.factorcode.org Git - factor.git/commitdiff
webapps.help: make sure to set ``f`` when empty
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 20 Jan 2022 17:34:05 +0000 (09:34 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 20 Jan 2022 17:34:05 +0000 (09:34 -0800)
extra/webapps/help/help.factor

index c5e8d04d5d0d6d4e204b1091b508fd4e577c3f26..c0ab8abdcdb7c5d30d3216a18938668e40455b6d 100644 (file)
@@ -12,8 +12,8 @@ TUPLE: help-webapp < dispatcher ;
 : links ( apropos -- seq )
     [ swap <simple-link> ] { } assoc>map ;
 
-: ?links ( has-links? apropos -- has-links? seq )
-    links [ empty? not or ] keep ;
+: ?links ( has-links? apropos -- has-links? seq/f )
+    links [ f ] [ nip t swap ] if-empty ;
 
 :: <search-action> ( help-dir -- action )
     <page-action>