about summary refs log tree commit diff
path: root/tvix/eval/src/builtins
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/builtins')
-rw-r--r--tvix/eval/src/builtins/mod.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs
index 598c8aa08ece..1ea23d49e632 100644
--- a/tvix/eval/src/builtins/mod.rs
+++ b/tvix/eval/src/builtins/mod.rs
@@ -12,8 +12,7 @@ use std::{
 
 use crate::{
     errors::ErrorKind,
-    upvalues::UpvalueCarrier,
-    value::{Builtin, Closure, CoercionKind, NixAttrs, NixList, NixString, Value},
+    value::{Builtin, CoercionKind, NixAttrs, NixList, NixString, Value},
     vm::VM,
 };
 
@@ -147,14 +146,13 @@ fn pure_builtins() -> Vec<Builtin> {
         }),
         Builtin::new("map", &[true, true], |args, vm| {
             let list: NixList = args[1].to_list()?;
-            let func: Closure = args[0].to_closure()?;
 
             list.into_iter()
                 .map(|val| {
                     // Leave the argument on the stack before calling the
                     // function.
                     vm.push(val);
-                    vm.call(func.lambda(), func.upvalues().clone(), 1)
+                    vm.call_value(&args[0])
                 })
                 .collect::<Result<Vec<Value>, _>>()
                 .map(|list| Value::List(NixList::from(list)))