Skip to content
Snippets Groups Projects
Commit 8120a2a3 authored by Sandro Stucki's avatar Sandro Stucki Committed by Manos Koukoutos
Browse files

Changes argument of '==>' to be by-name.

parent a6724892
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,8 @@ package object lang {
}
@inline
def ==> (that: Boolean): Boolean = {
!underlying || that
def ==>(that: => Boolean): Boolean = {
if (underlying) that else true
}
}
......@@ -40,11 +40,11 @@ package object lang {
@ignore
def error[T](reason: java.lang.String): T = sys.error(reason)
@ignore
implicit class Passes[A,B](io : (A,B)) {
val (in, out) = io
def passes(tests : A => B ) : Boolean =
def passes(tests : A => B ) : Boolean =
try { tests(in) == out } catch { case _ : MatchError => true }
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment