let get_att_f ?default f name l =
  match get_att name l with
    None -> default
  | Some s -> Some (f s)