paper and code

added code and finished the higher order function section.