[Haskell-cafe] Syntax for modifying nested product types

Tomasz Zielonka t.zielonka at students.mimuw.edu.pl
Fri Apr 23 12:26:22 EDT 2004

On Fri, Apr 23, 2004 at 10:11:40AM +0100, Malcolm Wallace wrote:
> If the pattern is very common, how about just naming it?
>     perhaps cond f field = if cond then f field else field
>     foo { bar = perhaps cond0 f (bar foo)
>         , wib = perhaps cond1 g (wib foo) }

Good idea, but I think that name like 'applyIf' or 'condApply' would be

Best regards,

.signature: Too many levels of symbolic links

More information about the Haskell-Cafe mailing list