[nem-en] Re: match on specific parameter

Philippe Quesnel philippe.quesnel at gmail.com
Sun Jan 29 19:55:30 CET 2006


On 1/29/06, Alejandro Serrano <trupill at yahoo.es> wrote:
>
>
> In my opinion, it should match in all parameters on in none:
>
> tt (a, b, c)
>   | (1, true, _) =>
>
> If you want to match other thing, I find cleaner
>
> tt (a, b, c)
>   match (a, b)
>     | (1, true) =>
>
> And it would help both coder, and type inference engine
>

makes sense, so we have:

tt(a, match b, c)
 | true
 | false

tt(a, b, c)
 | (1, 0, true )
 | (1, 0, false)

tt ( a, b, c )
 match (a,c)
  | (1, true)
  | (0, true)

tt ( match a, match b, c )
  | (1, true)
  | (0, true)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman/pipermail/devel-en/attachments/20060129/31b849b2/attachment.html


More information about the devel-en mailing list