]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/webapps/help/help.factor
webapps.help: make sure to set ``f`` when empty
[factor.git] / 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>