What is name of type " Function->Value->Bool = if (Bool) Function (Value) " in Category theory? I am very new to functional programming so sorry if the question is stupid.
Having this function
const noname = func =&gt; val =&gt; bool =&gt; bool? func(val) : val

And following situation
// if event.target has css class 'draggable-box' , add drag listener to it, using event
compose(
    noname( add_drag_listener )(event),
    elem_has_css_class('draggable-box'),
    prop('target'),
)(event) 

In Category theory, what is the correct name for the noname function? Is there such a type?
Maybe currying is the syntax you refer, and passing arguments as functions:


const sum = (a, b, c) =&gt; a + b + c;
const partial = a =&gt; b =&gt; c =&gt; sum(a, b, c);

console.log(partial(1)(2)(3));          // 6