brundonsmith / rust_lisp

A Rust-embeddable Lisp, with support for interop with native Rust functions
234 stars 20 forks source link

`map` causes a runtime error when called with nested lists #14

Closed adri326 closed 2 years ago

adri326 commented 2 years ago

The following piece of code causes a RuntimeError:

(map (lambda (x) x) (list (list 0 1) (list 2 3)))

Expected: ((0 1) (2 3)) Actual: Runtime error: Argument 0 is not callable

This is likely caused by https://github.com/brundonsmith/rust_lisp/blob/master/src/default_environment.rs#L185

brundonsmith commented 2 years ago

Fixed in https://github.com/brundonsmith/rust_lisp/commit/659dd0ddfaf514ce3d25eb039a624122b7be7723