lexical-closures Questions
7
Solved
I was reading about closures on the net. I was wondering if C++ has a built-in facility for closures or if there is any way we can implement closures in C++?
Kepner asked 28/9, 2012 at 7:5
2
Solved
I am looking for a fancy way to prevent a closure from inheriting surrounding scrope. For example:
let foo = function(t){
let x = 'y';
t.bar = function(){
console.log(x); // => 'y'
});
...
Licastro asked 22/7, 2017 at 23:45
2
I have a Vue JS (Vuetify) App that makes an ajax request that I would like to populate a div's content with the response, however I am having difficulties accessing the instance's data. All example...
Laaspere asked 20/7, 2017 at 14:1
9
Solved
I need a callback function that is almost exactly the same for a series of gui events. The function will behave slightly differently depending on which event has called it. Seems like a simpl...
Kuykendall asked 2/6, 2009 at 8:7
2
Solved
function buildList( list ) {
var i = 0;
var first = function () {
console.log( "in" )
console.log( i );
}
var Second = function () {
console.log( "out" )
first();
}
return Second;
}
va...
Browder asked 23/12, 2016 at 7:48
1
I understand how arrow functions work in ES6, and the lexical this, but I was wondering if anyone knows of a way to get the arguments passed to an arrow function?
In ES5, you can simply do:
...
Corroborant asked 12/2, 2016 at 16:59
4
Solved
I understand functions in 'js' have lexical scope (i.e. functions create their environment (scope) when they are defined not when they are executed.)
function f1() {
var a = 1;
f2();
}
function...
Gemmell asked 24/6, 2013 at 15:37
1
Solved
I'm reading about C# and closure, various articles, Jon Skeet's awesome "C# in Depth" and I see statements like "C# and ruby implement lexical closure".
Why do the authors include the word "lexica...
Salzman asked 24/11, 2013 at 0:24
4
Solved
The sexp in question is
(((lambda (b)
(lambda (a)
(+ b a))) 3) 5)
which, to me, looks like it should evaluate to 8, and in other lisps (e.g. Racket) it does, but in elisp it instead throws thi...
Kubis asked 14/6, 2013 at 6:2
4
Solved
I'm trying to create curry function that can be applied to any function and return another, with 1 of the arguments applied.
Properties that I want to have:
If function has only one argument curr...
Welcy asked 11/3, 2011 at 13:22
1
© 2022 - 2024 — McMap. All rights reserved.