memo

メモ sub cons { #construct Pair Data my ($x, $y) = @_; return sub { my $m = shift; #dispatch if ( $m == 0) { return $x; }elsif ($m == 1) { return $y; } }; } sub car { #$z must be Pair Data my $z = shift; $z->(0); } sub cdr { my $z = shift;…