3 ms·
It's a runtime check. The following fennel: (fn add-1 [x] (+ x 1)) (lambda add-2 [x] (+ x 2)) transpiles to the following lua: local function ad
by sullyj3 3y ago
It's a runtime check. The following fennel:
(fn add-1 [x] (+ x 1))
(lambda add-2 [x] (+ x 2))
transpiles to the following lua:
local function add_1(x)
return (x + 1)
end
local function add_2(x)
_G.assert((nil ~= x), "Missing argument x on /home/sullyj3/tmp/fn-vs-lambda/fnl/x.fnl:3")
return (x + 2)
end
return add_2
- robertlagrant 3y agoGotcha - thanks!