Re: Filter on future doesn't make sense
Roland Kuhn <[email protected]> Fri, 1 Jul 2016 20:28:56 +0200
| Newsgroups | gmane.comp.lang.scala |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_27C2D3B3-9909-4179-AAB7-C77FEF06C476 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 To my mind the moral to be learnt from this example is that pattern matching on internal structure of the container is potentially inco= nsistent monadic combinators (and similar extensions) are more careful in avoiding t= he exposure of internal details Whether or not this seems odd lies in the eye of the beholder, but from a t= heoretical perspective that=E2=80=99s just how it is. Regards, Roland > 1 juli 2016 kl. 20:12 skrev Avi Levi <[email protected]>: >=20 > Viktor, Oliver=20 > I guess you are correct . > But=20 > scala> Some(1).filter(_ =3D=3D 0) > res0: Option[Int] =3D None > scala> Set(1, 2, 3).filter(_ =3D=3D 0) > res1: scala.collection.immutable.Set[Int] =3D Set() > BUT > val x =3D Future{1}.filter(_ =3D=3D 0) > Failure(java.util.NoSuchElementException: Future.filter predicate is not = satisfied)) >=20 >=20 >=20 > 2016-07-01 20:52 GMT+03:00 Viktor Klang <[email protected] <mailto:v= [email protected]>>: > Hi Avi, >=20 > I'm unsure "seems odd" can be discussed successfully, I'm afraid. >=20 > As have been demonstrated, filter on Future behaves semantically equivale= nt to the methods used by for-comprehensions (map, flatMap, filter/withFilt= er and foreach) >=20 > --=20 > Cheers, > =E2=88=9A >=20 > On Jul 1, 2016 4:17 PM, "Avi Levi" <[email protected] <mailto:123avi@gmail= .com>> wrote: > Hi Ronald , > taking the example above=20 > scala>val x =3D Future{1}.filter(_ =3D=3D 0) > scala>x.value > res2: Option[scala.util.Try[Int]] =3D Some(Failure(java.util.NoSuchElemen= tException: Future.filter predicate is not satisfied)) >=20 > It seems odd that a legit action such as filter yields a failure with an = exception .=20 >=20 > Cheers=20 > Avi >=20 >=20 > 2016-07-01 17:02 GMT+03:00 Roland Kuhn <[email protected] <mailto:google@= rkuhn.info>>: > Well =E2=80=A6 technically (and no, this is NOT a good idea, and hence it= looks a little odd): >=20 > scala> import concurrent._ > import concurrent._ >=20 > scala> import ExecutionContext.Implicits._ > import ExecutionContext.Implicits._ >=20 > scala> import duration._ > import duration._ >=20 > scala> Future(42) > res0: scala.concurrent.Future[Int] =3D scala.concurrent.impl.Promise$Defa= ultPromise@25bbf683 >=20 > scala> Await.ready(res0, 1.second).value.get.toOption > res1: Option[Int] =3D Some(42) >=20 > scala> Await.ready(res0.filter(_ =3D=3D 1), 1.second).value.get.toOption > res2: Option[Int] =3D None >=20 > Regards, >=20 > Roland >=20 >> 1 juli 2016 kl. 15:18 skrev Oliver Ruebenacker <[email protected] <mailto= :[email protected]>>: >>=20 >>=20 >> Hello Roland, >>=20 >> Option has get, getOrElse and the possibility to match against Some(va= lue), but Future does not have these. >>=20 >> Best, Oliver >>=20 >> On Fri, Jul 1, 2016 at 9:06 AM, Roland Kuhn <[email protected] <mailto:g= [email protected]>> wrote: >> The difference is that Option does not have onComplete: if you restrict = yourself to the Option API then Future behaves observably in the same way. = If you want to have something like onComplete you should look at Either[NoS= uchElementException, T]#fold. >>=20 >> In general there is no .filter on monads because that would require the = explicit ability to represent emptiness (which is not part of the contract)= ; the success path for the combinators could be seen as such a representati= on and it is indeed often used as such, so Future is quite well-behaved in = this regard. Another comment I=E2=80=99d like to make on the discussed chan= ge is that it is not reasonable to expect that the result of filtering retu= rns a different type than the original one=E2=80=94no other container has t= his behavior. >>=20 >> Regards, >>=20 >> Roland >>=20 >>=20 >>> 1 juli 2016 kl. 14:54 skrev Oliver Ruebenacker <[email protected] <mailt= o:[email protected]>>: >>>=20 >>>=20 >>> Hello, >>>=20 >>> Looks like sometimes you do get an exception: >>>=20 >>> Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_= 45). >>> Type in expressions for evaluation. Or try :help. >>>=20 >>> scala> import scala.concurrent.Future >>> import scala.concurrent.Future >>>=20 >>> scala> import scala.concurrent.ExecutionContext.Implicits.global >>> import scala.concurrent.ExecutionContext.Implicits.global >>>=20 >>> scala> Future{1}.onComplete { case _ =3D> println("Complete!") } >>>=20 >>> scala> Complete! >>>=20 >>>=20 >>> scala> Future{1}.filter(_ =3D=3D 0).onComplete { case _ =3D> println("C= omplete!") } >>> Complete! >>>=20 >>> scala> import scala.util.{Success, Failure } >>> import scala.util.{Success, Failure} >>>=20 >>> scala> Future{1}.filter(_ =3D=3D 0).onComplete { >>> | case Success(value) =3D> println(value) >>> | case Failure(ex) =3D> println(ex) >>> | } >>>=20 >>> java.util.NoSuchElementException: Future.filter predicate is not satisf= ied >>> scala> >>>=20 >>> Best, Oliver >>>=20 >>>=20 >>> On Fri, Jul 1, 2016 at 5:44 AM, Viktor Klang <[email protected] <m= ailto:[email protected]>> wrote: >>> I think you are conflating the notion of optionality here. >>>=20 >>> option.filter(p).map(f).foreach(println) >>>=20 >>> behaves exactly like >>>=20 >>> future.filter(p).map(f).foreach(println) >>>=20 >>> --=20 >>> Cheers, >>> =E2=88=9A >>>=20 >>> On Jul 1, 2016 11:36 AM, "Avi Levi" <[email protected] <mailto:123avi@gm= ail.com>> wrote: >>> Correct, just on future you get an exception if element does not pass t= he filter. Wouldn't it be better if we can get something that express an em= pty future?=20 >>>=20 >>> On Jul 1, 2016 12:30 PM, "Viktor Klang" <[email protected] <mailto= :[email protected]>> wrote: >>> But you don't get an exception on the success path. All operations on t= he success path will be skipped, just as for Option. >>>=20 >>> --=20 >>> Cheers, >>> =E2=88=9A >>>=20 >>> On Jul 1, 2016 10:35 AM, "Avi Levi" <[email protected] <mailto:123avi@gm= ail.com>> wrote: >>> Hi Victor , >>> I totally agree that expectations are subjective . >>> But like you said a filter on List will return a List if no element com= ply than we will get Nil which represents an empty container (empty list) >>> a filter on option will return a option if the element doesn't comply t= han we will get None which represents an empty container=20 >>> following the same logic a filter on future should return something tha= t express empty container , defiantly not an exception, because it is not a= n exception we do intend to filter those elements. >>>=20 >>> =20 >>>=20 >>> 2016-07-01 10:50 GMT+03:00 Viktor Klang <[email protected] <mailto= :[email protected]>>: >>> Hi Avi, >>>=20 >>> I see what you mean. >>>=20 >>> I'd want to avoid discussing expectation since it is subjective. I will= however note that the actualnsemantics of the filter method on Future need= s improvement: http://www.scala-lang.org/api/2.11.8/index.html#scala.concur= rent.Future@filter(p:T=3D <http://www.scala-lang.org/api/2.11.8/index.html#= scala.concurrent.Future@filter(p:T=3D>>Boolean)(implicitexecutor:scala.conc= urrent.ExecutionContext):scala.concurrent.Future[T] >>>=20 >>> As for might not return the value, the same goes for all filter-methods= : >>>=20 >>> List returns List, but it might not have any elements at all. Option re= turns Option but can be Some or None, Future is either Success or Failure. >>>=20 >>> If success has an optionality aspect in your usage, use Future of Optio= n to express that, that would be my recommendation.=20 >>>=20 >>> --=20 >>> Cheers, >>> =E2=88=9A >>>=20 >>> On Jul 1, 2016 9:20 AM, "Avi Levi" <[email protected] <mailto:123avi@gma= il.com>> wrote: >>> Thanks Victor, >>> Of course it can be implemented as you suggested. But still I can argue= that the current implementation is not "really filtering" the results as o= ne might expect and less expressive if it might or not return the value tha= n Option is more expressive, don't you agree?=20 >>>=20 >>> On Jul 1, 2016 10:06 AM, "Viktor Klang" <[email protected] <mailto= :[email protected]>> wrote: >>> Hi Avi, >>>=20 >>> Use Fututre[Option[Int]] if you want to deal with Some/None as a result= of filter ( f.map(_.filter(p) ) (alt. see monad transformers) >>>=20 >>> --=20 >>> Cheers, >>> =E2=88=9A >>>=20 >>> On Jul 1, 2016 8:53 AM, "Avi Levi" <[email protected] <mailto:123avi@gma= il.com>> wrote: >>> I was trying to figure out what should I accept when filtering over a f= uture . >>> the current implementation yields either a T or an exception which kind= of breaks referential transparency (doesn't it ?) . >>> on the other hand what can I expect given this expression=20 >>> def foo(i:Int):Future[Int] >>>=20 >>> the type result of=20 >>>=20 >>> foo(1).filter(_ % 2 =3D=3D 0) >>>=20 >>>=20 >>>=20 >>> I.M.H.O I would expect it to yield Option[T] which makes more sense to= express that we might get a value that pass the filter or not . is that ma= ke sense ? >>>=20 >>> Cheers >>> Avi=20 >>>=20 >>> --=20 >>> You received this message because you are subscribed to the Google Grou= ps "scala-language" group. >>> To unsubscribe from this group and stop receiving emails from it, send = an email to [email protected] <mailto:scala-langu= [email protected]>. >>> For more options, visit https://groups.google.com/d/optout <https://gro= ups.google.com/d/optout>. >>>=20 >>> --=20 >>> You received this message because you are subscribed to a topic in the = Google Groups "scala-language" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/topic= /scala-language/wpGOB8f7qmY/unsubscribe <https://groups.google.com/d/topic/= scala-language/wpGOB8f7qmY/unsubscribe>. >>> To unsubscribe from this group and all its topics, send an email to sca= [email protected] <mailto:scala-language+unsubscribe= @googlegroups.com>. >>> For more options, visit https://groups.google.com/d/optout <https://gro= ups.google.com/d/optout>. >>>=20 >>> --=20 >>> You received this message because you are subscribed to the Google Grou= ps "scala-language" group. >>> To unsubscribe from this group and stop receiving emails from it, send = an email to [email protected] <mailto:scala-langu= [email protected]>. >>> For more options, visit https://groups.google.com/d/optout <https://gro= ups.google.com/d/optout>. >>>=20 >>> --=20 >>> You received this message because you are subscribed to a topic in the = Google Groups "scala-language" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/topic= /scala-language/wpGOB8f7qmY/unsubscribe <https://groups.google.com/d/topic/= scala-language/wpGOB8f7qmY/unsubscribe>. >>> To unsubscribe from this group and all its topics, send an email to sca= [email protected] <mailto:scala-language+unsubscribe= @googlegroups.com>. >>> For more options, visit https://groups.google.com/d/optout <https://gro= ups.google.com/d/optout>. >>>=20 >>>=20 >>>=20 >>> --=20 >>> Sincerely, >>> Avi Levi >>> m: +972-52-3459959 <tel:%2B972-52-3459959> >>> <https://www.linkedin.com/in/leviavi> >>> https://about.me/avi.levi <https://about.me/avi.levi> >>>=20 >>> --=20 >>> You received this message because you are subscribed to the Google Grou= ps "scala-language" group. >>> To unsubscribe from this group and stop receiving emails from it, send = an email to [email protected] <mailto:scala-langu= [email protected]>. >>> For more options, visit https://groups.google.com/d/optout <https://gro= ups.google.com/d/optout>. >>>=20 >>> --=20 >>> You received this message because you are subscribed to a topic in the = Google Groups "scala-language" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/topic= /scala-language/wpGOB8f7qmY/unsubscribe <https://groups.google.com/d/topic/= scala-language/wpGOB8f7qmY/unsubscribe>. >>> To unsubscribe from this group and all its topics, send an email to sca= [email protected] <mailto:scala-language+unsubscribe= @googlegroups.com>. >>> For more options, visit https://groups.google.com/d/optout <https://gro= ups.google.com/d/optout>. >>>=20 >>> --=20 >>> You received this message because you are subscribed to the Google Grou= ps "scala-language" group. >>> To unsubscribe from this group and stop receiving emails from it, send = an email to [email protected] <mailto:scala-langu= [email protected]>. >>> For more options, visit https://groups.google.com/d/optout <https://gro= ups.google.com/d/optout>. >>>=20 >>> --=20 >>> You received this message because you are subscribed to the Google Grou= ps "scala-language" group. >>> To unsubscribe from this group and stop receiving emails from it, send = an email to [email protected] <mailto:scala-langu= [email protected]>. >>> For more options, visit https://groups.google.com/d/optout <https://gro= ups.google.com/d/optout>. >>>=20 >>>=20 >>>=20 >>> --=20 >>> Oliver Ruebenacker >>> Senior Software Engineer, Diabetes Portal <http://www.type2diabetesgene= tics.org/>, Broad Institute <http://www.broadinstitute.org/> >>>=20 >>>=20 >>> --=20 >>> You received this message because you are subscribed to the Google Grou= ps "scala-language" group. >>> To unsubscribe from this group and stop receiving emails from it, send = an email to [email protected] <mailto:scala-langu= [email protected]>. >>> For more options, visit https://groups.google.com/d/optout <https://gro= ups.google.com/d/optout>. >>=20 >>=20 >> --=20 >> You received this message because you are subscribed to the Google Group= s "scala-language" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n email to [email protected] <mailto:scala-langua= [email protected]>. >> For more options, visit https://groups.google.com/d/optout <https://grou= ps.google.com/d/optout>. >>=20 >>=20 >>=20 >> --=20 >> Oliver Ruebenacker >> Senior Software Engineer, Diabetes Portal <http://www.type2diabetesgenet= ics.org/>, Broad Institute <http://www.broadinstitute.org/> >>=20 >>=20 >> --=20 >> You received this message because you are subscribed to the Google Group= s "scala-language" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n email to [email protected] <mailto:scala-langua= [email protected]>. >> For more options, visit https://groups.google.com/d/optout <https://grou= ps.google.com/d/optout>. >=20 >=20 > --=20 > You received this message because you are subscribed to a topic in the Go= ogle Groups "scala-language" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/s= cala-language/wpGOB8f7qmY/unsubscribe <https://groups.google.com/d/topic/sc= ala-language/wpGOB8f7qmY/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to scala= [email protected] <mailto:scala-language+unsubscribe@g= ooglegroups.com>. > For more options, visit https://groups.google.com/d/optout <https://group= s.google.com/d/optout>. >=20 >=20 >=20 > --=20 > Sincerely, > Avi Levi > m: +972-52-3459959 <tel:%2B972-52-3459959> > <https://www.linkedin.com/in/leviavi> > https://about.me/avi.levi <https://about.me/avi.levi> >=20 > --=20 > You received this message because you are subscribed to the Google Groups= "scala-language" group. > To unsubscribe from this group and stop receiving emails from it, send an= email to [email protected] <mailto:scala-languag= [email protected]>. > For more options, visit https://groups.google.com/d/optout <https://group= s.google.com/d/optout>. >=20 > --=20 > You received this message because you are subscribed to a topic in the Go= ogle Groups "scala-language" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/s= cala-language/wpGOB8f7qmY/unsubscribe <https://groups.google.com/d/topic/sc= ala-language/wpGOB8f7qmY/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to scala= [email protected] <mailto:scala-language+unsubscribe@g= ooglegroups.com>. > For more options, visit https://groups.google.com/d/optout <https://group= s.google.com/d/optout>. >=20 >=20 >=20 > --=20 > Sincerely, > Avi Levi > m: +972-52-3459959 > <https://www.linkedin.com/in/leviavi> > https://about.me/avi.levi <https://about.me/avi.levi> >=20 > --=20 > You received this message because you are subscribed to the Google Groups= "scala-language" group. > To unsubscribe from this group and stop receiving emails from it, send an= email to [email protected] <mailto:scala-languag= [email protected]>. > For more options, visit https://groups.google.com/d/optout <https://group= s.google.com/d/optout>. --=20 You received this message because you are subscribed to the Google Groups "= scala-language" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. For more options, visit https://groups.google.com/d/optout. --Apple-Mail=_27C2D3B3-9909-4179-AAB7-C77FEF06C476 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset= =3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s= pace; -webkit-line-break: after-white-space;" class=3D"">To my mind the mor= al to be learnt from this example is that<div class=3D""><br class=3D""><di= v class=3D""><ul class=3D"MailOutline"><li class=3D"">pattern matching on i= nternal structure of the container is potentially inconsistent</li><li clas= s=3D"">monadic combinators (and similar extensions) are more careful in avo= iding the exposure of internal details</li></ul><div class=3D""><br class= =3D""></div></div><div class=3D"">Whether or not this seems odd lies in the= eye of the beholder, but from a theoretical perspective that=E2=80=99s jus= t how it is.</div><div class=3D""><br class=3D""></div><div class=3D"">Rega= rds,</div><div class=3D""><br class=3D""></div><div class=3D"">Roland</div>= <div class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><d= iv class=3D"">1 juli 2016 kl. 20:12 skrev Avi Levi <<a href=3D"mailto:12= [email protected]" class=3D"">[email protected]</a>>:</div><br class=3D"Appl= e-interchange-newline"><div class=3D""><div dir=3D"rtl" style=3D"font-famil= y: GaramondPremrPro; font-size: 15px; font-style: normal; font-variant-caps= : normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-= align: start; text-indent: 0px; text-transform: none; white-space: normal; = widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D"= "><div dir=3D"ltr" class=3D"">Viktor, Oliver </div><div dir=3D"ltr" cl= ass=3D"">I guess you are correct .</div><div dir=3D"ltr" class=3D"">But&nbs= p;</div><div dir=3D"ltr" class=3D""><div dir=3D"ltr" class=3D"">scala> S= ome(1).filter(_ =3D=3D 0)</div><div dir=3D"ltr" class=3D"">res0: Option[Int= ] =3D None</div><div dir=3D"ltr" class=3D""><div dir=3D"ltr" class=3D"">sca= la> Set(1, 2, 3).filter(_ =3D=3D 0)</div><div dir=3D"ltr" class=3D"">res= 1: scala.collection.immutable.Set[Int] =3D Set()</div><div class=3D"">BUT</= div><div class=3D"">val x =3D Future{1}.filter(_ =3D=3D 0)<br class=3D""></= div><div class=3D"">Failure(java.util.NoSuchElementException: Future.filter= predicate is not satisfied))<br class=3D""></div><div class=3D""><br class= =3D""></div><div class=3D""><br class=3D""></div></div></div></div><div cla= ss=3D"gmail_extra" style=3D"font-family: GaramondPremrPro; font-size: 15px;= font-style: normal; font-variant-caps: normal; font-weight: normal; letter= -spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-= transform: none; white-space: normal; widows: auto; word-spacing: 0px; -web= kit-text-stroke-width: 0px;"><br class=3D""><div class=3D"gmail_quote"><div= dir=3D"ltr" class=3D"">2016-07-01 20:52 GMT+03:00 Viktor Klang<span class= =3D"Apple-converted-space"> </span><span dir=3D"ltr" class=3D""><<a= href=3D"mailto:[email protected]" target=3D"_blank" class=3D"">viktor= [email protected]</a>></span>:</div><blockquote class=3D"gmail_quote" sty= le=3D"margin: 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204= , 204, 204); border-left-style: solid; border-right-width: 1px; border-righ= t-color: rgb(204, 204, 204); border-right-style: solid; padding-left: 1ex; = padding-right: 1ex;"><p dir=3D"ltr" class=3D"">Hi Avi,</p><p dir=3D"ltr" cl= ass=3D"">I'm unsure "seems odd" can be discussed successfully, I'm afraid.<= /p><p dir=3D"ltr" class=3D"">As have been demonstrated, filter on Future be= haves semantically equivalent to the methods used by for-comprehensions (ma= p, flatMap, filter/withFilter and foreach)</p><span class=3D"HOEnZb"><font = color=3D"#888888" class=3D""><p dir=3D"ltr" class=3D"">--<span class=3D"App= le-converted-space"> </span><br class=3D"">Cheers,<br class=3D"">=E2= =88=9A</p></font></span><div class=3D"HOEnZb"><div class=3D"h5"><div class= =3D"gmail_quote">On Jul 1, 2016 4:17 PM, "Avi Levi" <<a href=3D"mailto:1= [email protected]" target=3D"_blank" class=3D"">[email protected]</a>> wrot= e:<br type=3D"attribution" class=3D""><blockquote class=3D"gmail_quote" sty= le=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color:= rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir= =3D"rtl" class=3D""><div dir=3D"ltr" class=3D"">Hi Ronald ,</div><div dir= =3D"ltr" class=3D"">taking the example above </div><div dir=3D"ltr" cl= ass=3D"">scala>val x =3D Future{1}.filter(_ =3D=3D 0)</div><div dir=3D"l= tr" class=3D""><div dir=3D"ltr" class=3D"">scala>x.value</div><div dir= =3D"ltr" class=3D"">res2: Option[scala.util.Try[Int]] =3D Some(Failure(java= .util.NoSuchElementException: Future.filter predicate is not satisfied))</d= iv></div><div dir=3D"ltr" class=3D""><br class=3D""></div><div dir=3D"ltr" = class=3D"">It seems odd that a legit action such as filter yields a failure= with an exception . <br class=3D""></div><div dir=3D"ltr" class=3D"">= <br class=3D""></div><div dir=3D"ltr" class=3D"">Cheers </div><div dir= =3D"ltr" class=3D"">Avi</div><div dir=3D"ltr" class=3D""><div class=3D""><b= r class=3D""></div></div></div><div class=3D"gmail_extra"><br class=3D""><d= iv class=3D"gmail_quote"><div dir=3D"ltr" class=3D"">2016-07-01 17:02 GMT+0= 3:00 Roland Kuhn<span class=3D"Apple-converted-space"> </span><span di= r=3D"ltr" class=3D""><<a href=3D"mailto:[email protected]" target=3D"_bl= ank" class=3D"">[email protected]</a>></span>:</div><blockquote class=3D= "gmail_quote" style=3D"margin: 0px 0.8ex; border-left-width: 1px; border-le= ft-color: rgb(204, 204, 204); border-left-style: solid; border-right-width:= 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; pa= dding-left: 1ex; padding-right: 1ex;"><div style=3D"word-wrap: break-word;"= class=3D"">Well =E2=80=A6 technically (and no, this is NOT a good idea, an= d hence it looks a little odd):<div class=3D""><br class=3D""></div><div cl= ass=3D""><div class=3D""><font face=3D"Courier" class=3D"">scala> import= concurrent._</font></div><div class=3D""><font face=3D"Courier" class=3D""= >import concurrent._</font></div><div class=3D""><font face=3D"Courier" cla= ss=3D""><br class=3D""></font></div><div class=3D""><font face=3D"Courier" = class=3D"">scala> import ExecutionContext.Implicits._</font></div><div c= lass=3D""><font face=3D"Courier" class=3D"">import ExecutionContext.Implici= ts._</font></div><div class=3D""><font face=3D"Courier" class=3D""><br clas= s=3D""></font></div><div class=3D""><font face=3D"Courier" class=3D"">scala= > import duration._</font></div><div class=3D""><font face=3D"Courier" c= lass=3D"">import duration._</font></div><div class=3D""><font face=3D"Couri= er" class=3D""><br class=3D""></font></div><div class=3D""><font face=3D"Co= urier" class=3D"">scala> Future(42)</font></div><div class=3D""><font fa= ce=3D"Courier" class=3D"">res0: scala.concurrent.Future[Int] =3D scala.conc= urrent.impl.Promise$DefaultPromise@25bbf683</font></div><div class=3D""><fo= nt face=3D"Courier" class=3D""><br class=3D""></font></div><div class=3D"">= <font face=3D"Courier" class=3D"">scala> Await.ready(res0, 1.second).val= ue.get.toOption</font></div><div class=3D""><font face=3D"Courier" class=3D= "">res1: Option[Int] =3D Some(42)</font></div></div><div class=3D""><font f= ace=3D"Courier" class=3D""><br class=3D""></font></div><div class=3D""><fon= t face=3D"Courier" class=3D""><div class=3D"">scala> Await.ready(res0.fi= lter(_ =3D=3D 1), 1.second).value.get.toOption</div><div class=3D"">res2: O= ption[Int] =3D None</div></font></div><div class=3D""><br class=3D""></div>= <div class=3D"">Regards,</div><div class=3D""><br class=3D""></div><div cla= ss=3D"">Roland</div><div class=3D""><div class=3D""><div class=3D""><br cla= ss=3D""><div class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"= ">1 juli 2016 kl. 15:18 skrev Oliver Ruebenacker <<a href=3D"mailto:curo= [email protected]" target=3D"_blank" class=3D"">[email protected]</a>>:</div><= br class=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div class=3D""><= div class=3D""><div class=3D""><br class=3D""></div>  = ;<span class=3D"Apple-converted-space"> </span>Hello Roland,<br class= =3D""><br class=3D""></div> <span class=3D"Apple-converted-space">&nbs= p;</span>Option has get, getOrElse and the possibility to match against Som= e(value), but Future does not have these.<br class=3D""><br class=3D""></di= v> <span class=3D"Apple-converted-space"> </spa= n>Best, Oliver<br class=3D""></div><div class=3D"gmail_extra"><br class=3D"= "><div class=3D"gmail_quote">On Fri, Jul 1, 2016 at 9:06 AM, Roland Kuhn<sp= an class=3D"Apple-converted-space"> </span><span dir=3D"ltr" class=3D"= "><<a href=3D"mailto:[email protected]" target=3D"_blank" class=3D"">goo= [email protected]</a>></span><span class=3D"Apple-converted-space"> </= span>wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin= : 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 20= 4, 204); border-left-style: solid; padding-left: 1ex;"><div style=3D"word-w= rap: break-word;" class=3D"">The difference is that Option does not have on= Complete: if you restrict yourself to the Option API then Future behaves ob= servably in the same way. If you want to have something like onComplete you= should look at<span class=3D"Apple-converted-space"> </span><font fac= e=3D"Courier" class=3D"">Either[NoSuchElementException, T]#fold</font>.<div= class=3D""><br class=3D""></div><div class=3D"">In general there is no .fi= lter on monads because that would require the explicit ability to represent= emptiness (which is not part of the contract); the success path for the co= mbinators could be seen as such a representation and it is indeed often use= d as such, so Future is quite well-behaved in this regard. Another comment = I=E2=80=99d like to make on the discussed change is that it is not reasonab= le to expect that the result of filtering returns a different type than the= original one=E2=80=94no other container has this behavior.</div><div class= =3D""><br class=3D""></div><div class=3D"">Regards,</div><div class=3D""><b= r class=3D""></div><div class=3D"">Roland<div class=3D""><div class=3D""><b= r class=3D""><div class=3D""><br class=3D""><div class=3D""><blockquote typ= e=3D"cite" class=3D""><div class=3D"">1 juli 2016 kl. 14:54 skrev Oliver Ru= ebenacker <<a href=3D"mailto:[email protected]" target=3D"_blank" class= =3D"">[email protected]</a>>:</div><br class=3D""><div class=3D""><div di= r=3D"ltr" class=3D""><div class=3D""><div class=3D""><br class=3D""></div>&= nbsp; <span class=3D"Apple-converted-space"> </span>H= ello,<br class=3D""><br class=3D""></div> <span class=3D"Apple-convert= ed-space"> </span>Looks like sometimes you do get an exception:<br cla= ss=3D""><div class=3D""><div class=3D""><br class=3D""><b class=3D""><span = style=3D"font-family: monospace, monospace;" class=3D"">Welcome to Scala 2.= 11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45).<br class=3D"">Type= in expressions for evaluation. Or try :help.<br class=3D""><br class=3D"">= scala> import scala.concurrent.Future<br class=3D"">import scala.concurr= ent.Future<br class=3D""><br class=3D"">scala> import scala.concurrent.E= xecutionContext.Implicits.global<br class=3D"">import scala.concurrent.Exec= utionContext.Implicits.global<br class=3D""><br class=3D"">scala> Future= {1}.onComplete { case _ =3D> println("Complete!") }<br class=3D""><br cl= ass=3D"">scala> Complete!<br class=3D""><br class=3D""><br class=3D"">sc= ala> Future{1}.filter(_ =3D=3D 0).onComplete { case _ =3D> println("C= omplete!") }<br class=3D"">Complete!<br class=3D""><br class=3D"">scala>= import scala.util.{Success, Failure }<br class=3D"">import scala.util.{Suc= cess, Failure}<br class=3D""><br class=3D"">scala> Future{1}.filter(_ = =3D=3D 0).onComplete {<br class=3D""> <span class=3D= "Apple-converted-space"> </span>| case Success(value) =3D> println(= value)<br class=3D""> <span class=3D"Apple-converted= -space"> </span>| case Failure(ex) =3D> println(ex)<br class=3D"">&= nbsp; <span class=3D"Apple-converted-space"> </span>|= }<br class=3D""><br class=3D"">java.util.NoSuchElementException: Future.fi= lter predicate is not satisfied<br class=3D"">scala></span></b><br class= =3D""><br class=3D""></div><div class=3D""> <span cl= ass=3D"Apple-converted-space"> </span>Best, Oliver<br class=3D""></div= ><div class=3D""><br class=3D""></div></div></div><div class=3D"gmail_extra= "><br class=3D""><div class=3D"gmail_quote">On Fri, Jul 1, 2016 at 5:44 AM,= Viktor Klang<span class=3D"Apple-converted-space"> </span><span dir= =3D"ltr" class=3D""><<a href=3D"mailto:[email protected]" target=3D= "_blank" class=3D"">[email protected]</a>></span><span class=3D"App= le-converted-space"> </span>wrote:<br class=3D""><blockquote class=3D"= gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; bo= rder-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left= : 1ex;"><p dir=3D"ltr" class=3D"">I think you are conflating the notion of = optionality here.</p><p dir=3D"ltr" class=3D"">option.filter(p).map(f).fore= ach(println)</p><p dir=3D"ltr" class=3D"">behaves exactly like</p><p dir=3D= "ltr" class=3D"">future.filter(p).map(f).foreach(println)</p><span class=3D= ""><font color=3D"#888888" class=3D""><p dir=3D"ltr" class=3D"">--<span cla= ss=3D"Apple-converted-space"> </span><br class=3D"">Cheers,<br class= =3D"">=E2=88=9A</p></font></span><div class=3D""><div class=3D""><div class= =3D"gmail_quote">On Jul 1, 2016 11:36 AM, "Avi Levi" <<a href=3D"mailto:= [email protected]" target=3D"_blank" class=3D"">[email protected]</a>> wro= te:<br type=3D"attribution" class=3D""><blockquote class=3D"gmail_quote" st= yle=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color= : rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><p dir= =3D"ltr" class=3D"">Correct, just on future you get an exception if element= does not pass the filter. Wouldn't it be better if we can get something th= at express an empty future?<span class=3D"Apple-converted-space"> </sp= an></p><div class=3D"gmail_quote">On Jul 1, 2016 12:30 PM, "Viktor Klang" &= lt;<a href=3D"mailto:[email protected]" target=3D"_blank" class=3D"">v= [email protected]</a>> wrote:<br type=3D"attribution" class=3D""><bl= ockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-l= eft-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: s= olid; padding-left: 1ex;"><p dir=3D"ltr" class=3D"">But you don't get an ex= ception on the success path. All operations on the success path will be ski= pped, just as for Option.</p><p dir=3D"ltr" class=3D"">--<span class=3D"App= le-converted-space"> </span><br class=3D"">Cheers,<br class=3D"">=E2= =88=9A</p><div class=3D"gmail_quote">On Jul 1, 2016 10:35 AM, "Avi Levi" &l= t;<a href=3D"mailto:[email protected]" target=3D"_blank" class=3D"">123avi@g= mail.com</a>> wrote:<br type=3D"attribution" class=3D""><blockquote clas= s=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1p= x; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding= -left: 1ex;"><div dir=3D"rtl" class=3D""><div dir=3D"ltr" class=3D"">Hi Vic= tor ,</div><div dir=3D"ltr" class=3D"">I totally agree that expectations ar= e subjective .</div><div dir=3D"ltr" class=3D"">But like you said a filter = on List will return a List if no element comply than we will get Nil which = represents an empty container (empty list)</div><div dir=3D"ltr" class=3D""= >a filter on option will return a option if the element doesn't comply than= we will get None which represents an empty container </div><div dir= =3D"ltr" class=3D"">following the same logic a filter on future should retu= rn something that express empty container , defiantly not an exception, bec= ause it is not an exception we do intend to filter those elements.</div><di= v dir=3D"ltr" class=3D""><br class=3D""></div><div dir=3D"ltr" class=3D"">&= nbsp;</div></div><div class=3D"gmail_extra"><br class=3D""><div class=3D"gm= ail_quote"><div dir=3D"ltr" class=3D"">2016-07-01 10:50 GMT+03:00 Viktor Kl= ang<span class=3D"Apple-converted-space"> </span><span dir=3D"ltr" cla= ss=3D""><<a href=3D"mailto:[email protected]" target=3D"_blank" cla= ss=3D"">[email protected]</a>></span>:</div><blockquote class=3D"gm= ail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; bord= er-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: = 1ex;"><p dir=3D"ltr" class=3D"">Hi Avi,</p><p dir=3D"ltr" class=3D"">I see = what you mean.</p><p dir=3D"ltr" class=3D"">I'd want to avoid discussing ex= pectation since it is subjective. I will however note that the actualnseman= tics of the filter method on Future needs improvement:<span class=3D"Apple-= converted-space"> </span><a href=3D"http://www.scala-lang.org/api/2.11= .8/index.html#scala.concurrent.Future@filter(p:T=3D" target=3D"_blank" clas= s=3D"">http://www.scala-lang.org/api/2.11.8/index.html#scala.concurrent.Fut= ure@filter(p:T=3D</a>>Boolean)(implicitexecutor:scala.concurrent.Executi= onContext):scala.concurrent.Future[T]</p><p dir=3D"ltr" class=3D"">As for m= ight not return the value, the same goes for all filter-methods:</p><p dir= =3D"ltr" class=3D"">List returns List, but it might not have any elements a= t all. Option returns Option but can be Some or None, Future is either Succ= ess or Failure.</p><p dir=3D"ltr" class=3D"">If success has an optionality = aspect in your usage, use Future of Option to express that, that would be m= y recommendation.<span class=3D"Apple-converted-space"> </span></p><sp= an class=3D""><font color=3D"#888888" class=3D""><p dir=3D"ltr" class=3D"">= --<span class=3D"Apple-converted-space"> </span><br class=3D"">Cheers,= <br class=3D"">=E2=88=9A</p></font></span><div class=3D""><div class=3D""><= div class=3D"gmail_quote">On Jul 1, 2016 9:20 AM, "Avi Levi" <<a href=3D= "mailto:[email protected]" target=3D"_blank" class=3D"">[email protected]</a>= > wrote:<br type=3D"attribution" class=3D""><blockquote class=3D"gmail_q= uote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-le= ft-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"= ><p dir=3D"ltr" class=3D"">Thanks Victor,<br class=3D"">Of course it can be= implemented as you suggested. But still I can argue that the current imple= mentation is not "really filtering" the results as one might expect and les= s expressive if it might or not return the value than Option is more expres= sive, don't you agree?<span class=3D"Apple-converted-space"> </span></= p><div class=3D"gmail_quote">On Jul 1, 2016 10:06 AM, "Viktor Klang" <<a= href=3D"mailto:[email protected]" target=3D"_blank" class=3D"">viktor= [email protected]</a>> wrote:<br type=3D"attribution" class=3D""><blockqu= ote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-w= idth: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid;= padding-left: 1ex;"><p dir=3D"ltr" class=3D"">Hi Avi,</p><p dir=3D"ltr" cl= ass=3D"">Use Fututre[Option[Int]] if you want to deal with Some/None as a r= esult of filter ( f.map(_.filter(p) ) (alt. see monad transformers)</p><p d= ir=3D"ltr" class=3D"">--<span class=3D"Apple-converted-space"> </span>= <br class=3D"">Cheers,<br class=3D"">=E2=88=9A</p><div class=3D"gmail_quote= ">On Jul 1, 2016 8:53 AM, "Avi Levi" <<a href=3D"mailto:[email protected]= " target=3D"_blank" class=3D"">[email protected]</a>> wrote:<br type=3D"a= ttribution" class=3D""><blockquote style=3D"margin: 0px 0px 0px 0.8ex; bord= er-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-styl= e: solid; padding-left: 1ex;" class=3D""><div dir=3D"ltr" class=3D"">I was = trying to figure out what should I accept when filtering over a future .<di= v class=3D"">the current implementation yields either a T or an exception w= hich kind of breaks referential transparency (doesn't it ?) .</div><div cla= ss=3D"">on the other hand what can I expect given this expression </di= v><div class=3D""><p class=3D""><span class=3D""><i class=3D"">def foo(i:In= t):Future[Int]</i></span></p><p class=3D""><span class=3D"">the type result= of </span></p><p class=3D""><i class=3D"">foo(1).filter(_ % 2 =3D=3D = 0)</i></p><p class=3D""><span class=3D""><br class=3D""></span></p></div><d= iv class=3D"">I.M.H.O I would expect it to yield Option[T] which make= s more sense to express that we might get a value that pass the filter or n= ot . is that make sense ?</div><div class=3D""><br class=3D""></div><div cl= ass=3D"">Cheers</div><font color=3D"#888888" class=3D""><div class=3D"">Avi= </div></font></div><font color=3D"#888888" class=3D""><div class=3D""= ><br class=3D""></div>--<span class=3D"Apple-converted-space"> </span>= <br class=3D"">You received this message because you are subscribed to the = Google Groups "scala-language" group.<br class=3D"">To unsubscribe from thi= s group and stop receiving emails from it, send an email to<span class=3D"A= pple-converted-space"> </span><a href=3D"mailto:scala-language+unsubsc= [email protected]" target=3D"_blank" class=3D"">scala-language+unsubscr= [email protected]</a>.<br class=3D"">For more options, visit<span class= =3D"Apple-converted-space"> </span><a href=3D"https://groups.google.co= m/d/optout" target=3D"_blank" class=3D"">https://groups.google.com/d/optout= </a>.<br class=3D""></font></blockquote></div><div class=3D""><br class=3D"= "></div>--<span class=3D"Apple-converted-space"> </span><br class=3D""= >You received this message because you are subscribed to a topic in the Goo= gle Groups "scala-language" group.<br class=3D"">To unsubscribe from this t= opic, visit<span class=3D"Apple-converted-space"> </span><a href=3D"ht= tps://groups.google.com/d/topic/scala-language/wpGOB8f7qmY/unsubscribe" tar= get=3D"_blank" class=3D"">https://groups.google.com/d/topic/scala-language/= wpGOB8f7qmY/unsubscribe</a>.<br class=3D"">To unsubscribe from this group a= nd all its topics, send an email to<span class=3D"Apple-converted-space">&n= bsp;</span><a href=3D"mailto:[email protected]" t= arget=3D"_blank" class=3D"">[email protected]</a>= .<br class=3D"">For more options, visit<span class=3D"Apple-converted-space= "> </span><a href=3D"https://groups.google.com/d/optout" target=3D"_bl= ank" class=3D"">https://groups.google.com/d/optout</a>.<br class=3D""></blo= ckquote></div><div class=3D""><br class=3D""></div>--<span class=3D"Apple-c= onverted-space"> </span><br class=3D"">You received this message becau= se you are subscribed to the Google Groups "scala-language" group.<br class= =3D"">To unsubscribe from this group and stop receiving emails from it, sen= d an email to<span class=3D"Apple-converted-space"> </span><a href=3D"= mailto:[email protected]" target=3D"_blank" class= =3D"">[email protected]</a>.<br class=3D"">For mo= re options, visit<span class=3D"Apple-converted-space"> </span><a href= =3D"https://groups.google.com/d/optout" target=3D"_blank" class=3D"">https:= //groups.google.com/d/optout</a>.<br class=3D""></blockquote></div><div cla= ss=3D""><br class=3D""></div>--<span class=3D"Apple-converted-space"> = </span><br class=3D"">You received this message because you are subscribed = to a topic in the Google Groups "scala-language" group.<br class=3D"">To un= subscribe from this topic, visit<span class=3D"Apple-converted-space"> = ;</span><a href=3D"https://groups.google.com/d/topic/scala-language/wpGOB8f= 7qmY/unsubscribe" target=3D"_blank" class=3D"">https://groups.google.com/d/= topic/scala-language/wpGOB8f7qmY/unsubscribe</a>.<br class=3D"">To unsubscr= ibe from this group and all its topics, send an email to<span class=3D"Appl= e-converted-space"> </span><a href=3D"mailto:scala-language+unsubscrib= [email protected]" target=3D"_blank" class=3D"">scala-language+unsubscribe= @googlegroups.com</a>.<br class=3D"">For more options, visit<span class=3D"= Apple-converted-space"> </span><a href=3D"https://groups.google.com/d/= optout" target=3D"_blank" class=3D"">https://groups.google.com/d/optout</a>= .<br class=3D""></div></div></blockquote></div><br class=3D""><br clear=3D"= all" class=3D""><div class=3D""><br class=3D""></div>--<span class=3D"Apple= -converted-space"> </span><br class=3D""><div data-smartmail=3D"gmail_= signature" class=3D""><div dir=3D"rtl" class=3D""><div class=3D""><div dir= =3D"rtl" class=3D""><div class=3D""><div dir=3D"rtl" class=3D""><div dir=3D= "ltr" class=3D""><span style=3D"color: rgb(51, 51, 51); font-family: proxim= a-nova-1, proxima-nova-2, Tahoma, Helvetica, Verdana, sans-serif; font-size= : 14px; line-height: 21px;" class=3D"">Sincerely,</span><br style=3D"color:= rgb(51, 51, 51); font-family: proxima-nova-1, proxima-nova-2, Tahoma, Helv= etica, Verdana, sans-serif; font-size: 14px; line-height: 21px;" class=3D""= ><span style=3D"color: rgb(51, 51, 51); font-family: proxima-nova-1, proxim= a-nova-2, Tahoma, Helvetica, Verdana, sans-serif; font-size: 14px; line-hei= ght: 21px;" class=3D"">Avi Levi</span></div><div dir=3D"ltr" class=3D""><sp= an style=3D"color: rgb(51, 51, 51); font-family: proxima-nova-1, proxima-no= va-2, Tahoma, Helvetica, Verdana, sans-serif; font-size: 14px; line-height:= 21px;" class=3D"">m:<span class=3D"Apple-converted-space"> </span><a = href=3D"tel:%2B972-52-3459959" value=3D"+972523459959" target=3D"_blank" cl= ass=3D"">+972-52-3459959</a></span><span style=3D"color: rgb(51, 51, 51); f= ont-family: proxima-nova-1, proxima-nova-2, Tahoma, Helvetica, Verdana, san= s-serif; font-size: 14px; line-height: 21px;" class=3D""><br class=3D""></s= pan></div><div dir=3D"ltr" class=3D""><span style=3D"color: rgb(51, 51, 51)= ; font-family: proxima-nova-1, proxima-nova-2, Tahoma, Helvetica, Verdana, = sans-serif; font-size: 14px; line-height: 21px;" class=3D""><a href=3D"http= s://www.linkedin.com/in/leviavi" target=3D"_blank" class=3D""><img src=3D"h= ttps://docs.google.com/uc?export=3Ddownload&id=3D0B82ayL0XJaZ5WEY0c2xWQ= WYxNDQ&revid=3D0B82ayL0XJaZ5YklVWjUvcG9tQmNrVEFRSDhNd0lNLzUwKzlvPQ" cla= ss=3D""><span class=3D""></span><span class=3D""></span></a></span></div><d= iv dir=3D"ltr" class=3D""><span style=3D"margin: 0px; padding: 0px; border:= 0px; outline: 0px; font-size: 14px; font-family: proxima-nova-1, proxima-n= ova-2, Tahoma, Helvetica, Verdana, sans-serif; vertical-align: baseline; co= lor: rgb(43, 130, 173); line-height: 21px;" class=3D""><a href=3D"https://a= bout.me/avi.levi" target=3D"_blank" class=3D"">https://about.me/avi.levi</a= ></span><br class=3D""></div></div></div></div></div></div></div></div><div= class=3D""><br class=3D""></div>--<span class=3D"Apple-converted-space">&n= bsp;</span><br class=3D"">You received this message because you are subscri= bed to the Google Groups "scala-language" group.<br class=3D"">To unsubscri= be from this group and stop receiving emails from it, send an email to<span= class=3D"Apple-converted-space"> </span><a href=3D"mailto:scala-langu= [email protected]" target=3D"_blank" class=3D"">scala-langua= [email protected]</a>.<br class=3D"">For more options, visit<= span class=3D"Apple-converted-space"> </span><a href=3D"https://groups= .google.com/d/optout" target=3D"_blank" class=3D"">https://groups.google.co= m/d/optout</a>.<br class=3D""></blockquote></div><div class=3D""><br class= =3D""></div>--<span class=3D"Apple-converted-space"> </span><br class= =3D"">You received this message because you are subscribed to a topic in th= e Google Groups "scala-language" group.<br class=3D"">To unsubscribe from t= his topic, visit<span class=3D"Apple-converted-space"> </span><a href= =3D"https://groups.google.com/d/topic/scala-language/wpGOB8f7qmY/unsubscrib= e" target=3D"_blank" class=3D"">https://groups.google.com/d/topic/scala-lan= guage/wpGOB8f7qmY/unsubscribe</a>.<br class=3D"">To unsubscribe from this g= roup and all its topics, send an email to<span class=3D"Apple-converted-spa= ce"> </span><a href=3D"mailto:scala-language+unsubscribe@googlegroups.= com" target=3D"_blank" class=3D"">[email protected]= om</a>.<br class=3D"">For more options, visit<span class=3D"Apple-converted= -space"> </span><a href=3D"https://groups.google.com/d/optout" target= =3D"_blank" class=3D"">https://groups.google.com/d/optout</a>.<br class=3D"= "></blockquote></div><div class=3D""><br class=3D""></div>--<span class=3D"= Apple-converted-space"> </span><br class=3D"">You received this messag= e because you are subscribed to the Google Groups "scala-language" group.<b= r class=3D"">To unsubscribe from this group and stop receiving emails from = it, send an email to<span class=3D"Apple-converted-space"> </span><a h= ref=3D"mailto:[email protected]" target=3D"_blank= " class=3D"">[email protected]</a>.<br class=3D""= >For more options, visit<span class=3D"Apple-converted-space"> </span>= <a href=3D"https://groups.google.com/d/optout" target=3D"_blank" class=3D""= >https://groups.google.com/d/optout</a>.<br class=3D""></blockquote></div><= div class=3D""><br class=3D""></div>--<span class=3D"Apple-converted-space"= > </span><br class=3D"">You received this message because you are subs= cribed to the Google Groups "scala-language" group.<br class=3D"">To unsubs= cribe from this group and stop receiving emails from it, send an email to<s= pan class=3D"Apple-converted-space"> </span><a href=3D"mailto:scala-la= [email protected]" target=3D"_blank" class=3D"">scala-lan= [email protected]</a>.<br class=3D"">For more options, vis= it<span class=3D"Apple-converted-space"> </span><a href=3D"https://gro= ups.google.com/d/optout" target=3D"_blank" class=3D"">https://groups.google= .com/d/optout</a>.<br class=3D""></div></div></blockquote></div><br class= =3D""><br clear=3D"all" class=3D""><br class=3D"">--<span class=3D"Apple-co= nverted-space"> </span><br class=3D""><div data-smartmail=3D"gmail_sig= nature" class=3D""><div dir=3D"ltr" class=3D""><div class=3D""><div dir=3D"= ltr" class=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div class=3D""= ><div dir=3D"ltr" class=3D""><div class=3D"">Oliver Ruebenacker<br class=3D= ""></div><div class=3D"">Senior Software Engineer,<span class=3D"Apple-conv= erted-space"> </span><a href=3D"http://www.type2diabetesgenetics.org/"= target=3D"_blank" class=3D"">Diabetes Portal</a>,<span class=3D"Apple-conv= erted-space"> </span><a href=3D"http://www.broadinstitute.org/" target= =3D"_blank" class=3D"">Broad Institute</a><br class=3D""></div><br class=3D= ""></div></div></div></div></div></div></div></div></div><div class=3D""><b= r class=3D""></div>--<span class=3D"Apple-converted-space"> </span><br= class=3D"">You received this message because you are subscribed to the Goo= gle Groups "scala-language" group.<br class=3D"">To unsubscribe from this g= roup and stop receiving emails from it, send an email to<span class=3D"Appl= e-converted-space"> </span><a href=3D"mailto:scala-language+unsubscrib= [email protected]" target=3D"_blank" class=3D"">scala-language+unsubscribe= @googlegroups.com</a>.<br class=3D"">For more options, visit<span class=3D"= Apple-converted-space"> </span><a href=3D"https://groups.google.com/d/= optout" target=3D"_blank" class=3D"">https://groups.google.com/d/optout</a>= .<br class=3D""></div></blockquote></div><br class=3D""></div></div></div><= /div></div><div class=3D""><div class=3D""><div class=3D""><br class=3D""><= /div>--<span class=3D"Apple-converted-space"> </span><br class=3D"">Yo= u received this message because you are subscribed to the Google Groups "sc= ala-language" group.<br class=3D"">To unsubscribe from this group and stop = receiving emails from it, send an email to<span class=3D"Apple-converted-sp= ace"> </span><a href=3D"mailto:scala-language+unsubscribe@googlegroups= .com" target=3D"_blank" class=3D"">scala-language+unsubscribe@googlegroups.= com</a>.<br class=3D"">For more options, visit<span class=3D"Apple-converte= d-space"> </span><a href=3D"https://groups.google.com/d/optout" target= =3D"_blank" class=3D"">https://groups.google.com/d/optout</a>.<br class=3D"= "></div></div></blockquote></div><br class=3D""><br clear=3D"all" class=3D"= "><br class=3D"">--<span class=3D"Apple-converted-space"> </span><br c= lass=3D""><div data-smartmail=3D"gmail_signature" class=3D""><div dir=3D"lt= r" class=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div class=3D""><= div dir=3D"ltr" class=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div= class=3D"">Oliver Ruebenacker<br class=3D""></div><div class=3D"">Senior S= oftware Engineer,<span class=3D"Apple-converted-space"> </span><a href= =3D"http://www.type2diabetesgenetics.org/" target=3D"_blank" class=3D"">Dia= betes Portal</a>,<span class=3D"Apple-converted-space"> </span><a href= =3D"http://www.broadinstitute.org/" target=3D"_blank" class=3D"">Broad Inst= itute</a><br class=3D""></div><br class=3D""></div></div></div></div></div>= </div></div></div></div><div class=3D""><br class=3D""></div>--<span class= =3D"Apple-converted-space"> </span><br class=3D"">You received this me= ssage because you are subscribed to the Google Groups "scala-language" grou= p.<br class=3D"">To unsubscribe from this group and stop receiving emails f= rom it, send an email to<span class=3D"Apple-converted-space"> </span>= <a href=3D"mailto:[email protected]" target=3D"_b= lank" class=3D"">[email protected]</a>.<br class= =3D"">For more options, visit<span class=3D"Apple-converted-space"> </= span><a href=3D"https://groups.google.com/d/optout" target=3D"_blank" class= =3D"">https://groups.google.com/d/optout</a>.<br class=3D""></div></blockqu= ote></div><br class=3D""></div></div></div></div><div class=3D""><div class= =3D""><div class=3D""><br class=3D"webkit-block-placeholder"></div>--<span = class=3D"Apple-converted-space"> </span><br class=3D"">You received th= is message because you are subscribed to a topic in the Google Groups "scal= a-language" group.<br class=3D"">To unsubscribe from this topic, visit<span= class=3D"Apple-converted-space"> </span><a href=3D"https://groups.goo= gle.com/d/topic/scala-language/wpGOB8f7qmY/unsubscribe" target=3D"_blank" c= lass=3D"">https://groups.google.com/d/topic/scala-language/wpGOB8f7qmY/unsu= bscribe</a>.<br class=3D"">To unsubscribe from this group and all its topic= s, send an email to<span class=3D"Apple-converted-space"> </span><a hr= ef=3D"mailto:[email protected]" target=3D"_blank"= class=3D"">[email protected]</a>.<br class=3D"">= For more options, visit<span class=3D"Apple-converted-space"> </span><= a href=3D"https://groups.google.com/d/optout" target=3D"_blank" class=3D"">= https://groups.google.com/d/optout</a>.<br class=3D""></div></div></blockqu= ote></div><br class=3D""><br clear=3D"all" class=3D""><div class=3D""><br c= lass=3D""></div>--<span class=3D"Apple-converted-space"> </span><br cl= ass=3D""><div data-smartmail=3D"gmail_signature" class=3D""><div dir=3D"rtl= " class=3D""><div class=3D""><div dir=3D"rtl" class=3D""><div class=3D""><d= iv dir=3D"rtl" class=3D""><div dir=3D"ltr" class=3D""><span style=3D"color:= rgb(51, 51, 51); font-family: proxima-nova-1, proxima-nova-2, Tahoma, Helv= etica, Verdana, sans-serif; font-size: 14px; line-height: 21px;" class=3D""= >Sincerely,</span><br style=3D"color: rgb(51, 51, 51); font-family: proxima= -nova-1, proxima-nova-2, Tahoma, Helvetica, Verdana, sans-serif; font-size:= 14px; line-height: 21px;" class=3D""><span style=3D"color: rgb(51, 51, 51)= ; font-family: proxima-nova-1, proxima-nova-2, Tahoma, Helvetica, Verdana, = sans-serif; font-size: 14px; line-height: 21px;" class=3D"">Avi Levi</span>= </div><div dir=3D"ltr" class=3D""><span style=3D"color: rgb(51, 51, 51); fo= nt-family: proxima-nova-1, proxima-nova-2, Tahoma, Helvetica, Verdana, sans= -serif; font-size: 14px; line-height: 21px;" class=3D"">m:<span class=3D"Ap= ple-converted-space"> </span><a href=3D"tel:%2B972-52-3459959" value= =3D"+972523459959" target=3D"_blank" class=3D"">+972-52-3459959</a></span><= span style=3D"color: rgb(51, 51, 51); font-family: proxima-nova-1, proxima-= nova-2, Tahoma, Helvetica, Verdana, sans-serif; font-size: 14px; line-heigh= t: 21px;" class=3D""><br class=3D""></span></div><div dir=3D"ltr" class=3D"= "><span style=3D"color: rgb(51, 51, 51); font-family: proxima-nova-1, proxi= ma-nova-2, Tahoma, Helvetica, Verdana, sans-serif; font-size: 14px; line-he= ight: 21px;" class=3D""><a href=3D"https://www.linkedin.com/in/leviavi" tar= get=3D"_blank" class=3D""><img src=3D"https://docs.google.com/uc?export=3Dd= ownload&id=3D0B82ayL0XJaZ5WEY0c2xWQWYxNDQ&revid=3D0B82ayL0XJaZ5YklV= WjUvcG9tQmNrVEFRSDhNd0lNLzUwKzlvPQ" class=3D""><span class=3D""></span><spa= n class=3D""></span></a></span></div><div dir=3D"ltr" class=3D""><span styl= e=3D"margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14px;= font-family: proxima-nova-1, proxima-nova-2, Tahoma, Helvetica, Verdana, s= ans-serif; vertical-align: baseline; color: rgb(43, 130, 173); line-height:= 21px;" class=3D""><a href=3D"https://about.me/avi.levi" target=3D"_blank" = class=3D"">https://about.me/avi.levi</a></span><br class=3D""></div></div><= /div></div></div></div></div></div><div class=3D""><br class=3D"webkit-bloc= k-placeholder"></div>--<span class=3D"Apple-converted-space"> </span><= br class=3D"">You received this message because you are subscribed to the G= oogle Groups "scala-language" group.<br class=3D"">To unsubscribe from this= group and stop receiving emails from it, send an email to<span class=3D"Ap= ple-converted-space"> </span><a href=3D"mailto:scala-language+unsubscr= [email protected]" target=3D"_blank" class=3D"">scala-language+unsubscri= [email protected]</a>.<br class=3D"">For more options, visit<span class= =3D"Apple-converted-space"> </span><a href=3D"https://groups.google.co= m/d/optout" target=3D"_blank" class=3D"">https://groups.google.com/d/optout= </a>.<br class=3D""></blockquote></div><div class=3D""><br class=3D"webkit-= block-placeholder"></div>--<span class=3D"Apple-converted-space"> </sp= an><br class=3D"">You received this message because you are subscribed to a= topic in the Google Groups "scala-language" group.<br class=3D"">To unsubs= cribe from this topic, visit<span class=3D"Apple-converted-space"> </s= pan><a href=3D"https://groups.google.com/d/topic/scala-language/wpGOB8f7qmY= /unsubscribe" target=3D"_blank" class=3D"">https://groups.google.com/d/topi= c/scala-language/wpGOB8f7qmY/unsubscribe</a>.<br class=3D"">To unsubscribe = from this group and all its topics, send an email to<span class=3D"Apple-co= nverted-space"> </span><a href=3D"mailto:scala-language+unsubscribe@go= oglegroups.com" target=3D"_blank" class=3D"">scala-language+unsubscribe@goo= glegroups.com</a>.<br class=3D"">For more options, visit<span class=3D"Appl= e-converted-space"> </span><a href=3D"https://groups.google.com/d/opto= ut" target=3D"_blank" class=3D"">https://groups.google.com/d/optout</a>.<br= class=3D""></div></div></blockquote></div><br class=3D""><br clear=3D"all"= class=3D""><div class=3D""><br class=3D""></div>--<span class=3D"Apple-con= verted-space"> </span><br class=3D""><div class=3D"gmail_signature" da= ta-smartmail=3D"gmail_signature"><div dir=3D"rtl" class=3D""><div class=3D"= "><div dir=3D"rtl" class=3D""><div class=3D""><div dir=3D"rtl" class=3D""><= div dir=3D"ltr" class=3D""><span style=3D"color: rgb(51, 51, 51); font-fami= ly: proxima-nova-1, proxima-nova-2, Tahoma, Helvetica, Verdana, sans-serif;= font-size: 14px; line-height: 21px;" class=3D"">Sincerely,</span><br style= =3D"color: rgb(51, 51, 51); font-family: proxima-nova-1, proxima-nova-2, Ta= homa, Helvetica, Verdana, sans-serif; font-size: 14px; line-height: 21px;" = class=3D""><span style=3D"color: rgb(51, 51, 51); font-family: proxima-nova= -1, proxima-nova-2, Tahoma, Helvetica, Verdana, sans-serif; font-size: 14px= ; line-height: 21px;" class=3D"">Avi Levi</span></div><div dir=3D"ltr" clas= s=3D""><span style=3D"color: rgb(51, 51, 51); font-family: proxima-nova-1, = proxima-nova-2, Tahoma, Helvetica, Verdana, sans-serif; font-size: 14px; li= ne-height: 21px;" class=3D"">m: +972-52-3459959</span><span style=3D"color:= rgb(51, 51, 51); font-family: proxima-nova-1, proxima-nova-2, Tahoma, Helv= etica, Verdana, sans-serif; font-size: 14px; line-height: 21px;" class=3D""= ><br class=3D""></span></div><div dir=3D"ltr" class=3D""><span style=3D"col= or: rgb(51, 51, 51); font-family: proxima-nova-1, proxima-nova-2, Tahoma, H= elvetica, Verdana, sans-serif; font-size: 14px; line-height: 21px;" class= =3D""><a href=3D"https://www.linkedin.com/in/leviavi" target=3D"_blank" cla= ss=3D""><img src=3D"https://docs.google.com/uc?export=3Ddownload&id=3D0= B82ayL0XJaZ5WEY0c2xWQWYxNDQ&revid=3D0B82ayL0XJaZ5YklVWjUvcG9tQmNrVEFRSD= hNd0lNLzUwKzlvPQ" class=3D""><span class=3D""></span><span class=3D""></spa= n></a></span></div><div dir=3D"ltr" class=3D""><span style=3D"margin: 0px; = padding: 0px; border: 0px; outline: 0px; font-size: 14px; font-family: prox= ima-nova-1, proxima-nova-2, Tahoma, Helvetica, Verdana, sans-serif; vertica= l-align: baseline; color: rgb(43, 130, 173); line-height: 21px;" class=3D""= ><a href=3D"https://about.me/avi.levi" target=3D"_blank" class=3D"">https:/= /about.me/avi.levi</a></span><br class=3D""></div></div></div></div></div><= /div></div></div><div style=3D"font-family: GaramondPremrPro; font-size: 15= px; font-style: normal; font-variant-caps: normal; font-weight: normal; let= ter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; te= xt-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -= webkit-text-stroke-width: 0px;" class=3D""><br class=3D"webkit-block-placeh= older"></div><span style=3D"font-family: GaramondPremrPro; font-size: 15px;= font-style: normal; font-variant-caps: normal; font-weight: normal; letter= -spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-= transform: none; white-space: normal; widows: auto; word-spacing: 0px; -web= kit-text-stroke-width: 0px; float: none; display: inline !important;" class= =3D"">--<span class=3D"Apple-converted-space"> </span></span><br style= =3D"font-family: GaramondPremrPro; font-size: 15px; font-style: normal; fon= t-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphan= s: auto; text-align: start; text-indent: 0px; text-transform: none; white-s= pace: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0= px;" class=3D""><span style=3D"font-family: GaramondPremrPro; font-size: 15= px; font-style: normal; font-variant-caps: normal; font-weight: normal; let= ter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; te= xt-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -= webkit-text-stroke-width: 0px; float: none; display: inline !important;" cl= ass=3D"">You received this message because you are subscribed to the Google= Groups "scala-language" group.</span><br style=3D"font-family: GaramondPre= mrPro; font-size: 15px; font-style: normal; font-variant-caps: normal; font= -weight: normal; letter-spacing: normal; orphans: auto; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; widows: auto; = word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><span style= =3D"font-family: GaramondPremrPro; font-size: 15px; font-style: normal; fon= t-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphan= s: auto; text-align: start; text-indent: 0px; text-transform: none; white-s= pace: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0= px; float: none; display: inline !important;" class=3D"">To unsubscribe fro= m this group and stop receiving emails from it, send an email to<span class= =3D"Apple-converted-space"> </span></span><a href=3D"mailto:scala-lang= [email protected]" style=3D"font-family: GaramondPremrPro; = font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight= : normal; letter-spacing: normal; orphans: auto; text-align: start; text-in= dent: 0px; text-transform: none; white-space: normal; widows: auto; word-sp= acing: 0px; -webkit-text-stroke-width: 0px;" class=3D"">scala-language+unsu= [email protected]</a><span style=3D"font-family: GaramondPremrPro; f= ont-size: 15px; font-style: normal; font-variant-caps: normal; font-weight:= normal; letter-spacing: normal; orphans: auto; text-align: start; text-ind= ent: 0px; text-transform: none; white-space: normal; widows: auto; word-spa= cing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !im= portant;" class=3D"">.</span><br style=3D"font-family: GaramondPremrPro; fo= nt-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: = normal; letter-spacing: normal; orphans: auto; text-align: start; text-inde= nt: 0px; text-transform: none; white-space: normal; widows: auto; word-spac= ing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><span style=3D"font-f= amily: GaramondPremrPro; font-size: 15px; font-style: normal; font-variant-= caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; t= ext-align: start; text-indent: 0px; text-transform: none; white-space: norm= al; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float:= none; display: inline !important;" class=3D"">For more options, visit<span= class=3D"Apple-converted-space"> </span></span><a href=3D"https://gro= ups.google.com/d/optout" style=3D"font-family: GaramondPremrPro; font-size:= 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; = letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px;= text-transform: none; white-space: normal; widows: auto; word-spacing: 0px= ; -webkit-text-stroke-width: 0px;" class=3D"">https://groups.google.com/d/o= ptout</a><span style=3D"font-family: GaramondPremrPro; font-size: 15px; fon= t-style: normal; font-variant-caps: normal; font-weight: normal; letter-spa= cing: normal; orphans: auto; text-align: start; text-indent: 0px; text-tran= sform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-= text-stroke-width: 0px; float: none; display: inline !important;" class=3D"= ">.</span></div></blockquote></div><br class=3D""></div></div></body></html= > <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;scala-language" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">scal= [email protected]</a>.<br /> For more options, visit <a href=3D"https://groups.google.com/d/optout">http= s://groups.google.com/d/optout</a>.<br /> --Apple-Mail=_27C2D3B3-9909-4179-AAB7-C77FEF06C476--