Exemple #1
0
}, 'hash-map' => function () {
    return call_user_func_array('_hash_map', func_get_args());
}, 'map?' => function ($a) {
    return _hash_map_Q($a);
}, 'assoc' => function () {
    return call_user_func_array('assoc', func_get_args());
}, 'dissoc' => function () {
    return call_user_func_array('dissoc', func_get_args());
}, 'get' => function ($a, $b) {
    return get($a, $b);
}, 'contains?' => function ($a, $b) {
    return contains_Q($a, $b);
}, 'keys' => function ($a) {
    return keys($a);
}, 'vals' => function ($a) {
    return vals($a);
}, 'sequential?' => function ($a) {
    return _sequential_Q($a);
}, 'cons' => function ($a, $b) {
    return cons($a, $b);
}, 'concat' => function () {
    return call_user_func_array('concat', func_get_args());
}, 'nth' => function ($a, $b) {
    return nth($a, $b);
}, 'first' => function ($a) {
    return first($a);
}, 'rest' => function ($a) {
    return rest($a);
}, 'empty?' => function ($a) {
    return empty_Q($a);
}, 'count' => function ($a) {
Exemple #2
0
function limit_init($pp = 20)
{
    $data = vals([['pi', 'uint'], ['pp', 'uint']]);
    $pi = isset($data['pi']) ? max(intval($data['pi']), 1) : 1;
    $pp = isset($data['pp']) ? intval($data['pp']) : $pp;
    return [($pi - 1) * $pp, $pp, 1, $pi];
}