home | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (t3731.scala)

This example Scala source code file (t3731.scala) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

m, m, stream, t, t, t=stream, test, zipwith, zipwith, zw, zw

The Scala t3731.scala source code

object Test{
  trait ZW[S]{type T}
  def ZipWith[S, M <: ZW[S]]: M#T = error("ZW")

  // meh must be parameterised to force an asSeenFrom that 
  // duplicates the refinement in the TR's pre without updating its sym
  def meh[A] = ZipWith[A, ZW[A]{type T=Stream[A]}]

  meh[Int]: Stream[Int]
}
// debugging output in coevolveSym should say:
// coevolved type T#11029 : Stream#3234[A#9228] to type T#11277 : Stream#3234[A#9227]
// with Test.ZW#9219[A#9228]{type T#11029 = Stream#3234[A#9228]} -> Test.ZW#9219[A#9227]{type T#11277 = Stream#3234[A#9227]}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala t3731.scala source code file:



my book on functional programming

 

new blog posts

 

Copyright 1998-2019 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.