[plt-scheme] typed scheme mutation & "style" question

From: Noel Welsh (noelwelsh at gmail.com)
Date: Wed Apr 14 15:59:49 EDT 2010

Perhaps you want for-each instead of map? Then your return type will
be just Void.


On Wed, Apr 14, 2010 at 8:40 PM, keydana at gmx.de <keydana at gmx.de> wrote:
> Hi,
> I have difficulties with using mutator code in typed scheme (in getting the typing right & "nice").
> For example, I have a function
> (: replace-attnames ((Listof (Pair Attribute String)) (Listof Attribute) -> (Listof (Listof Void))))
> (define replace-attnames
>  (lambda (renamings attrs)
>    (map (lambda: ((mapping : (Pair Attribute String))) (map (lambda: ((a : Attribute)) (set-Attribute-name! a (cdr mapping))) (filter (lambda: ((att : Attribute)) (attribute=? att (car mapping))) attrs))) renamings)))
> Many thanks in advance for your advice,
> Sigrid_________________________________________________

Posted on the users mailing list.