Composing Functions and Domain Analysis