Comment

Comment by sullyj3

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
parent sullyj3 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton