예제 #1
0
        def inner(expr, env):
            if sequence.is_last_expr(expr):
                return self._eval(sequence.first_expr(expr), env)

            if not self._eval(sequence.first_expr(expr), env):
                return Boolean(False)

            return inner(sequence.rest_exprs(expr), env)
예제 #2
0
        def inner(expr, env):
            if sequence.is_last_expr(expr):
                return self._eval(sequence.first_expr(expr), env)

            first_value = self._eval(sequence.first_expr(expr), env)
            if first_value:
                return first_value

            return inner(sequence.rest_exprs(expr), env)
예제 #3
0
 def _eval_sequence(self, expressions, env):
     if sequence.is_last_expr(expressions):
         return self._eval(sequence.first_expr(expressions), env)
     else:
         self._eval(sequence.first_expr(expressions), env)
         return self._eval_sequence(sequence.rest_exprs(expressions), env)