function composition type programming