Created
April 28, 2016 14:51
-
-
Save sammyrulez/6430b676eb078b4e5c10d5ae5dd86171 to your computer and use it in GitHub Desktop.
funtional aop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Wrapper { | |
| def apply[A,B](before:A=>A,fn:A=>B,after:B=>B):A=>B = { | |
| def wrapped(a:A):B = { | |
| after(fn(before(a))) | |
| } | |
| return wrapped | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.