Pattern matching - Factor Documentation

Pattern matching


The match vocabulary implements ML-style pattern matching.

Variables used for pattern matching must be explicitly defined first:
MATCH-VARS:


A basic pattern match:
match ( value1 value2 -- bindings )


A conditional form analogous to cond :
match-cond ( assoc -- quot )


Pattern replacement:
match-replace ( object pattern1 pattern2 -- result )



AltStyle によって変換されたページ (->オリジナル) /