function f_keyFilter($tester, $in, $keys=null) { //?? if(!isset($keys)) { $keys = array_keys($in); } if(!empty($in)) { if($tester(f_first($keys))) { return f_construct( f_first($in), f_keyFilter( $tester, f_rest($in), f_rest($keys) ) ); } else { return f_keyFilter( $tester, f_rest($in), f_rest($keys) ); } } else { return array(); } }
function chain($baseItem, $items = array()) { return eval(D::log('return ' . join('->', f_construct('$baseItem', (array) $items)) . ';', 'evalers')); }