aboutsummaryrefslogtreecommitdiff
path: root/rust/src/env.rs
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-10-27 21:42:46 -0500
committerJoel Martin <github@martintribe.org>2015-01-06 21:59:00 -0600
commit06fef9b51830a2aa696f3e108c56f306967ce465 (patch)
treed3568abe85505a7c825ad96ffabd44adc7b4d456 /rust/src/env.rs
parentb12d98e4e3424be6b1e851c9450e9532910996ec (diff)
downloadmal-06fef9b51830a2aa696f3e108c56f306967ce465.tar.gz
mal-06fef9b51830a2aa696f3e108c56f306967ce465.zip
rust: add atom support. Fix vector params.
Diffstat (limited to 'rust/src/env.rs')
-rw-r--r--rust/src/env.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/src/env.rs b/rust/src/env.rs
index 0d72e62..7ffc319 100644
--- a/rust/src/env.rs
+++ b/rust/src/env.rs
@@ -5,7 +5,7 @@ use std::cell::RefCell;
use std::collections::HashMap;
use std::fmt;
-use types::{MalVal,MalRet,Sym,List,_nil,list,err_string};
+use types::{MalVal,MalRet,Sym,List,Vector,_nil,list,err_string};
struct EnvType {
data: HashMap<String,MalVal>,
@@ -23,9 +23,9 @@ pub fn env_bind(env: &Env,
mexprs: MalVal) -> Result<Env,String> {
let mut variadic = false;
match *mbinds {
- List(ref binds) => {
+ List(ref binds) | Vector(ref binds) => {
match *mexprs {
- List(ref exprs) => {
+ List(ref exprs) | Vector(ref exprs) => {
let mut it = binds.iter().enumerate();
for (i, b) in it {
match **b {