Paste: condition test

Author: randy
Mode: factor
Date: Sun, 3 Jan 2010 09:14:53
Plain Text |
        delegate bool Cond (T2 x);

        delegate T IntCode<T>();

        T condition<T>(Cond cond, T2 item, T falseValue, IntCode codeblock)
        {
            if (!(cond(item))) { return falseValue; }
            else { return codeblock(); }
        }

New Annotation

Summary:
Author:
Mode:
Body: