MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / let

Function let

18-with-match/lispy/original/lispy.py:292–300  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

290 return [_cons, expand_quasiquote(x[0]), expand_quasiquote(x[1:])]
291
292def let(*args):
293 args = list(args)
294 x = cons(_let, args)
295 require(x, len(args)>1)
296 bindings, body = args[0], args[1:]
297 require(x, all(isa(b, list) and len(b)==2 and isa(b[0], Symbol)
298 for b in bindings), "illegal binding list")
299 vars, vals = zip(*bindings)
300 return [[_lambda, list(vars)]+list(map(expand, body))] + list(map(expand, vals))
301
302macro_table = {_let:let} ## More macros can go here
303

Callers

nothing calls this directly

Calls 2

consFunction · 0.85
requireFunction · 0.85

Tested by

no test coverage detected