def test_do(): assert eval(read('(do 1 2)')) == 2
def test_eval_func(): with raises(TypeError): assert eval(List([1, 2])) assert eval(List([Symbol('+'), 1, 2])) == 3
def test_eval_atom(): assert eval(1) == 1
def test_eval_symbol(): assert eval('+') with raises(RuntimeError): assert eval(List([Symbol('foo')]))
def lsp(source, env=top): return eval(read('(do {0})'.format(source)), env=env)