I'm curious if there is a specific name for this function in Lambda Calculus
const whatsMyName = f => a => { f(a); return a }
Also, would this be the correct signature?
// (f -> a -> b) -> a -> a
Example
const trace = whatsMyName(console.log)
Thanks!
-- EDIT:
This is just S(K), or Substitution(Constant). I was able to work this out, a more elaborate answer with good references:
Functional programming construct for composing identity and side effect
Specific Answer
https://stackoverflow.com/a/46120634/1560484
Thanks @ftor for comment!