Task

Pass a function     as an argument     to another function.



Related task

   First-class functions


function lambda_true(x: 'a)(y: 'a): 'a = x;;
function lambda_false(x: 'a)(y: 'a): 'a = y;;
function lambda_if(c:'a -> 'a -> 'a )(t: 'a)(f: 'a): 'a = c(t)(f);;
 
print( lambda_if(lambda_true)("condition was true")("condition was false") );;