function param { Function } func returns { T } description export function trampoline < T > ( func ) { let result = func . apply ( func , ... arguments ) ; while ( result && typeof ( result ) === "function" ) { result = result ( ) ; } return result ; }