A Functional Specification Of Effects