I need a function that takes an argument and if it happens to be a function, it calls it, i.e. something like
let foo x y =
match x with
| Fun -> x y
| _ -> y
but I wasn't able to find out how this could be done. What is the proper pattern-matching syntax here?