Closed TyOverby closed 9 years ago
This will let people swap the state out of an already loaded context.
This can be useful while inside of User Functions or Ast Functions.
let mut ctx = Context::new(); ctx.set_fn("something", ast_fn("something", |args, ctx| { let mut new_state = 0; ctx.with_other_state(&mut new_state, move |new_ctx| { for expr in args { new_ctx.eval(&expr); } } }));
lgtm!
This will let people swap the state out of an already loaded context.
This can be useful while inside of User Functions or Ast Functions.