masak / bel

An interpreter for Bel, Paul Graham's Lisp language
GNU General Public License v3.0
27 stars 1 forks source link

Make overargs an error #341

Closed masak closed 3 years ago

masak commented 3 years ago
> (uvar)
((nil))
> (uvar 'foo)
((nil))

The latter evaluation should result in Error: overargs.

Indeed, the code currently says this:

    if (is_nil($pat)) {
        # XXX: skipping the `'overargs` case for now
        push @{$self->{r}}, $env;
    }

So technically this falls under #118. But feel free to fix this one independently.

A bit curious to see if we'll get any test failures by fixing this one.