|
Scala example source code file (match2.scala)
The Scala match2.scala source code// $Id$ import scala.util.continuations._ object Test { def test1() = { val (a, b) = shift { k: (((String,String)) => String) => k("A","B") } b } case class Elem[T,U](a: T, b: U) def test2() = { val Elem(a,b) = shift { k: (Elem[String,String] => String) => k(Elem("A","B")) } b } def main(args: Array[String]): Any = { println(reset(test1())) println(reset(test2())) } } Other Scala examples (source code examples)Here is a short list of links related to this Scala match2.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.