|
Scala example source code file (bug602.scala)
The Scala bug602.scala source codepackage com.mosol.sl case class Span[K <: Ordered[K]](low: Option[K], high: Option[K]) extends Function1[K, Boolean] { override def equals(x$1: Any): Boolean = x$1 match { case Span((low$0 @ _), (high$0 @ _)) if low$0.equals(low).$amp$amp(high$0.equals(high)) => true case _ => false } def apply(k: K): Boolean = this match { case Span(Some(low), Some(high)) => (k >= low && k <= high) case Span(Some(low), None) => (k >= low) case Span(None, Some(high)) => (k <= high) case _ => false } } Other Scala examples (source code examples)Here is a short list of links related to this Scala bug602.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.