I am very new to functional programming so sorry if the question is stupid.
Having this function
const noname = func => val => bool => 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?