[web-devel] Setting variables in hamlet forall

vagif.verdi at gmail.com vagif.verdi at gmail.com
Thu Apr 7 01:57:27 CEST 2011


I noticed a pattern that in hamlet $forall i often retrieve the same value 
from a map, Sometimes 3,4 times.

    $forall row <- rs
            <td><a href=@{FormR (getInt "form_id" row)}>#{getStr "form_name" 
row} 
            <td>#{getStr "docname" row} 
            ...
            <td>#{fromMaybe "" (IntMap.lookup (getInt "form_id" row) 
counties)}
            <td>#{fromMaybe "" (IntMap.lookup (getInt "form_id" row) 
customers)}

Would it be possible to allow let statement in forall for often used values ?

Regards,
Vagif Verdi



More information about the web-devel mailing list