Given some function with a parameter for a Class (not an object or instance, but the Class itself), or equivalently a variable assigned to a Class. T ...
Given some function with a parameter for a Class (not an object or instance, but the Class itself), or equivalently a variable assigned to a Class. T ...
So, this is simple arrow function, but I don't understand how if sth, sth1, etc, works or what are they? Are they arguments as function or just value? ...
I want to apply a condition using higher-order infix extension function on a list of pair. I want my condition to show me the first numbers of the pai ...
what are first class functions and first order functions..? Both are same or not..? Is there any similarities/difference between first order and first ...
Assuming that foldr should be used to build data structures and foldl' if the result is supposed to be a single value, I'm not sure what to use for St ...
I'm trying to find the minimum number in array but it doesn't return the min value, it just works for the maximum number. code: The result should ...
The code I wrote times out at a higher range. Any way to optimize the code by just using higher-order ES6 functions. The link to the online environme ...
I need TypeScript to correctly infer the type T in the return value of my "wrongInference" function. interface Foo { bar: string; } const paramFun ...
I have a higher order function, createHandler, that takes rest arguments in the form of a variadic mapped tuple, mapping them to a generic object type ...
Fundamentally, I know what this code does, but I'm trying to fully understand the logic in withTempDir. Is the input(tempFolder.resolve("output").t ...
I wrote this function that solves the problem: However, the logs are: I think I know the problem which is whenever the function sumFour is calle ...
I'm trying to work with higher-order functions in Rust. I'm struggling because the parameter function that I want to pass is a closure that captures a ...
I was writing a haskell program where I needed to zip two lists with a function, but I didn't want it to stop at the end of the shorter list (like the ...
I am trying to promisify (or leverage async await feature) the callback in the function getId, using new Promise(resolve => ..., but because of the ...
How to refactor this function to a higher order function? It is meant to return a new array containing the sub-arrays of characters that contain the ...
This question below is from a past year NUS exam paper, and im not sure how to go about solving this; how do you break down the lambda parts and figur ...
I have this assignment: Consider a list where every element is a nested list of length 2. The first element of each nested list is either a 0 or a ...
The Code A is from the question answered by Roman Y. The Code A can work well when it invokes with background(appState)() {...}, why can't I remove p ...
Essentially, I am trying to write a scheme method which will use the map function to cube every item in a list. so it would go from '(1 2 3 4) to '(1 ...
This is an array of friends... with start and end of the friendship :) I want to sort the array by the computed duration of the friendship (end minus ...