Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (15 sloc) 314 Bytes
<?php declare(strict_types=1);
//require 'chapter_1.php';
/* Chapter 2 */
function is_lat
(array $l) : bool
{return
is_nulll($l)
|| (is_atom(car($l)) && is_lat(cdr($l)));
}
function is_member
($s, array $l) : bool
{return
is_nulll($l) ? FALSE
: is_eq($s, car($l)) || is_member($s, cdr($l));
}
You can’t perform that action at this time.