Start implementing type inference

http://i.imgur.com/uH8QQ.gif