Evgeny Chukreev akshaal

View MoneyTransfer.scala
1 2 3 4 5 6 7 8 9 10
case class Account(var amount: Int)
 
import MoneyTransfer._
 
class MoneyTransfer private (src: Account with SourceRole,
dst: Account with DestinationRole,
amount: Int) {
def transfer(): Unit = {
src transfer amount
}
View macro.scala
1 2 3 4 5 6 7 8 9 10
/** Akshaal, 2012. http://akshaal.info */
 
import language.experimental.macros
import scala.reflect.macros.Context
import scala.annotation.Annotation
 
/**
* Macros for traversing over annotated elements.
*
* See http://www.akshaal.info/2012/08/scala-210-annotated-fields-macro.html for more information.
View scala_existential_map.scala
1 2 3 4 5 6 7 8 9 10
// ---------------------------------------------------------------------------------------------
// Here is the definition of TypedKeyMap
 
import scala.language.implicitConversions
import scala.language.higherKinds
import scala.language.existentials
import scala.collection.immutable.{ MapLike, HashMap }
 
trait TypedKey {
type Value
Something went wrong with that request. Please try again.