]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/html/templates/chloe/syntax/syntax.factor
kernel: ?if-old is just `[ or* ] 2dip if`
[factor.git] / basis / html / templates / chloe / syntax / syntax.factor
index d0e49d581a3e8ddb3c000e5d52bf8306cef7bc8f..1a48e839a875946850a06a9f7aad7354a1eca133 100644 (file)
@@ -21,8 +21,8 @@ CONSTANT: chloe-ns "http://factorcode.org/chloe/1.0"
 XML-NS: chloe-name http://factorcode.org/chloe/1.0
 
 : required-attr ( tag name -- value )
-    [ nip ] [ chloe-name attr ] 2bi
-    [ ] [ " attribute is required" append throw ] ?if-old ;
+    [ nip ] [ chloe-name attr ] 2bi or*
+    [ " attribute is required" append throw ] unless ;
 
 : optional-attr ( tag name -- value )
     chloe-name attr ;