Added apple predicated (apple? and apple-consumed?) as well as scoring functions, with unit tests. (This completes proposed functional layer.)