prim_map, prim_genList: no need to force function argument which will be stored in mkApp

This commit is contained in:
volth 2018-07-07 23:30:17 +00:00 committed by GitHub
parent 627e28ba33
commit c03d73c1cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1428,7 +1428,6 @@ static void prim_tail(EvalState & state, const Pos & pos, Value * * args, Value
/* Apply a function to every element of a list. */
static void prim_map(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
state.forceFunction(*args[0], pos);
state.forceList(*args[1], pos);
state.mkList(v, args[1]->listSize());
@ -1556,7 +1555,6 @@ static void prim_all(EvalState & state, const Pos & pos, Value * * args, Value &
static void prim_genList(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
state.forceFunction(*args[0], pos);
auto len = state.forceInt(*args[1], pos);
if (len < 0)