Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: adfa7bf660
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (17 sloc) 0.571 kb
<?php
require_once 'Lisphp/Applicable.php';
require_once 'Lisphp/List.php';
require_once 'Lisphp/Scope.php';
final class Lisphp_Runtime_Setf implements Lisphp_Applicable {
function apply(Lisphp_Scope $scope, Lisphp_List $arguments) {
$name = $arguments[0];
if ($name instanceof Lisphp_Symbol) {
$retval = $arguments[1]->evaluate($scope);
} else {
throw new InvalidArgumentException(
'first operand of setf! form must be symbol'
);
}
return $scope[$name] = $retval;
}
}
Jump to Line
Something went wrong with that request. Please try again.