Comma quibbling: Difference between revisions
Content deleted Content added
→{{header|Factor}}: rewrite |
→{{header|Factor}}: simplify with a fancy pattern matcher |
||
Line 1,224:
=={{header|Factor}}==
This example uses the <code>inverse</code> vocabulary, which builds on the concept of invertible quotations as the basis for pattern matching. It is discussed at length in this approachable [http://micsymposium.org/mics_2009_proceedings/mics2009_submission_72.pdf paper].
<lang factor>USING:
: (quibble) ( seq --
{
{
{
[
}
: quibble ( seq -- str ) (quibble) "{%s}" sprintf ;
{ } qw{ ABC } qw{ ABC DEF } qw{ ABC DEF G H }
|