/*** Deletes the element at focus and moves the focus to the right. If there is no element on the right,* focus is moved to the left.*/def deleteRight: Option[Zipper[A]]
scala> zipper[Int](Stream.empty, 0, Stream(1, 2, 3 ,4)) findNext (_ == 4)res25: Option[scalaz.Zipper[Int]] = Some(<zipper>)scala> .flatMap(_.deleteRight)res27: Option[scalaz.Zipper[Int]] = None
zipper(Stream(2, 1, 0), 3, Stream.empty)
rights match {case Stream.Empty => Nonecase r #:: rs => Some(lefts match {case Stream.Empty => zipper(Stream.Empty, r, rs)case l #:: ls => zipper(ls, l, rights)})}
rights match {case r #:: rs => Some(zipper(lefts, r, rs)) case Stream.Empty => lefts match { case l #:: ls => some(zipper(ls, l, Stream.empty)) case Stream.Empty => None } }
> --
> You received this message because you are subscribed to the Google Groups
> "scalaz" group.
> To post to this group, send email to sca...@googlegroups.com.
> To unsubscribe from this group, send email to
> scalaz+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/scalaz?hl=en.
Make a branch dedicated to each pull request.
-jason