Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Functional TDD: A Clash of Cultures
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dale Wijnand  
View profile   Translate to Translated (View Original)
 More options Oct 2 2012, 10:32 am
From: Dale Wijnand <dale.wijn...@gmail.com>
Date: Tue, 2 Oct 2012 16:32:20 +0200
Local: Tues, Oct 2 2012 10:32 am
Subject: Re: [sug-it] Functional TDD: A Clash of Cultures

2012/10/2 Ivano Pagano <ivano.pag...@gmail.com>

> On Monday, October 1, 2012 9:00:22 PM UTC+2, lorenzo wrote:

>> 1. quando poi prendo tutti i gatti e vado a metterli in una lista e li
>> processo in quanto "Cat" perdo i miei rifinitissimi tipi e sono fregato.
>> Immagino che qualche meccanismo di double/multiple dispatch del linguaggio
>> mi permetta di recuperarli e portarli avanti comunque.

> val cats: List[Cat] = List(tom, rumtumtugger, felix, topcat)
> val smartCats = cats.filter(_.isInstanceOf[FullTummy])

> Putroppo la seconda lista non ha il type parameter giusto, ma puoi sempre
> chiamare  asInstanceOf[FullTummy]

val smartCats = cats.collect { case smartCat: FullTummy => smartCat }

Dale


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.