Composing and currying functions