Created
April 29, 2013 12:30
-
-
Save disolovyov/5481329 to your computer and use it in GitHub Desktop.
This file contains 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
[29.04.2013 15:05:41] Alexey Buzdin: | |
assertThat(jonSnow.knows(any(Object.class), is(true))) | |
AssertionError! | |
[29.04.2013 15:09:21] Dimitry Solovyov: | |
class JonSnow { | |
public <T> boolean knows(T subject) { | |
return false; | |
} | |
} | |
[29.04.2013 15:10:21] Dimitry Solovyov: | |
jonSnowKnows :: a -> Bool | |
jonSnowKnows _ = False | |
[29.04.2013 15:12:48] Alexey Buzdin: | |
def knows? (aThing: Any) = this match { | |
case _: JonSnow => false | |
case _ => tryToRemember(aThing) | |
} | |
[29.04.2013 15:21:21] Dimitry Solovyov: | |
(defn knows? [this thing] | |
(condp instance? this | |
JonSnow false | |
(try-to-remember thing))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment