Top "Higher-order-functions" questions

Higher-order functions are functions which either take functions as arguments or return them as output (or both).

Higher order functions in C

Is there a "proper" way to implement higher order functions in C. I'm mostly curious about things like portability and …

c functional-programming higher-order-functions
Good way to chain filter functions in javascript

I've got large json array of objects that I need to filter down based on multiple user select inputs. Currently …

javascript higher-order-functions
Get a subset of an array based on an array of keys

I wrote this function to get a subset of an array. Does php have a built in function for this. …

php arrays higher-order-functions
fold_tree in OCaml

As You may know, there are higher order functions in OCaml, such as fold_left, fold_right, filter etc. On …

functional-programming ocaml higher-order-functions
PHP array function that returns a subset for given keys

I'm looking for an array function that does something like this: $myArray = array( 'apple'=>'red', 'banana'=>'yellow', 'lettuce'=&…

php arrays higher-order-functions built-in
FoldLeft using FoldRight in scala

While going through Functional Programming in Scala, I came across this question: Can you right foldLeft in terms of foldRight? …

scala functional-programming currying fold higher-order-functions
Kotlin reflection is not available

I was trying to learn higher order functions from the first example of this video. Here's my code and output. …

kotlin higher-order-functions
React.cloneElement: pass new children or copy props.children?

I'm confused by the third "children" parameter of React.cloneElement and it's relation to this.props.children. I followed this …

javascript reactjs higher-order-functions