~scompall/+junk/java-stuff--scalafy

« back to all changes in this revision

Viewing changes to src/main/scala/com/nocandysw/java/stuff/TypeConfusion.scala

  • Committer: Stephen Compall
  • Date: 2012-01-28 01:17:02 UTC
  • Revision ID: scompall@nocandysw.com-20120128011702-yshbggnrdrk1o9xb
A fold implementation I don't understand, but type-checks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
  type Before = HCons[H, NextIdxView#Before]
61
61
  type After = NextIdxView#After
62
62
  type At = NextIdxView#At
63
 
  def fold[Z](f: (Before, At, After) => Z) = error("TODO")
 
63
  def fold[Z](f: (Before, At, After) => Z) =
 
64
    next.fold((before, at, after) => f(HCons(h, before), at, after))
64
65
}