]> gitweb.factorcode.org Git - factor.git/commitdiff
webapps.pastebin: fix calling >>annotations on f.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 15 Aug 2015 23:40:43 +0000 (16:40 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 15 Aug 2015 23:40:43 +0000 (16:40 -0700)
extra/webapps/pastebin/pastebin.factor

index 562639404adffcdf0cca6a0450afbfcbff1337db..81e07b44e6f5ad513f0dbcd00e1c7a4458b25513 100644 (file)
@@ -80,10 +80,10 @@ TUPLE: annotation < entity parent ;
 : lookup-annotation ( id -- annotation )
     [ f ] dip <annotation> select-tuple ;
 
-: paste ( id -- paste )
-    [ <paste-state> select-tuple ]
-    [ f <annotation> select-tuples ]
-    bi >>annotations ;
+: paste ( id -- paste/f )
+    [ <paste-state> select-tuple ] keep over [
+        f <annotation> select-tuples >>annotations
+    ] [ drop ] if ;
 
 ! ! !
 ! LINKS, ETC