Jesús Gómez on Nostr: "Best" definition of #Closure: "The concept of 'closure' is the idea that a lambda ...
"Best" definition of #Closure:
"The concept of 'closure' is the idea that a lambda expression 'captures'
the variable bindings that are in lexical scope at the point where the
lambda expression occurs. The procedure created by the lambda
expression can refer to and mutate the captured bindings, and the values
of those bindings persist between procedure calls." - GNU #Guile manual
procedure = function
lambda expression = build a function expression
lexical scope = what you can reach by reading
Published at
2024-04-28 10:28:30Event JSON
{
"id": "b13061b6e74635b748ccf138f93d87cd4b9eaf8a796e34a6aab85c22a5219438",
"pubkey": "8c1340cc15da8408652f223a6b0a717cea10aff5a2f5dcab677520bd545b09f0",
"created_at": 1714292910,
"kind": 1,
"tags": [
[
"t",
"closure"
],
[
"t",
"guile"
],
[
"proxy",
"https://mastodon.social/users/jgomo3/statuses/112347900203374943",
"activitypub"
]
],
"content": "\"Best\" definition of #Closure:\n\n\"The concept of 'closure' is the idea that a lambda expression 'captures'\nthe variable bindings that are in lexical scope at the point where the\nlambda expression occurs. The procedure created by the lambda\nexpression can refer to and mutate the captured bindings, and the values\nof those bindings persist between procedure calls.\" - GNU #Guile manual\n\nprocedure = function\nlambda expression = build a function expression\nlexical scope = what you can reach by reading",
"sig": "1cf8898e8e82f8257e027417323bfef96ec23fa38c4e21782d093e59e18e94fc46bbf3c9c1afab2792776cf0022b0c1c0f14c31b4f6051a9adeb0e20b647e8ce"
}