diff --git a/extra/dns/util/util.factor b/extra/dns/util/util.factor new file mode 100644 index 0000000000..bee1cc111e --- /dev/null +++ b/extra/dns/util/util.factor @@ -0,0 +1,11 @@ + +USING: kernel macros fry ; + +IN: dns.util + +: tri-chain ( obj p q r -- x y z ) + >r >r call dup r> call dup r> call ; inline + +MACRO: 1if ( test then else -- ) '[ dup @ , , if ] ; + +! : 1if ( test then else -- ) >r >r >r dup r> call r> r> if ; inline ; \ No newline at end of file