findFunction name dom = 
  let fns = domFuncs dom
      p f = prcdName f == name
  in find p fns
findFunction name dom = 
  let fns = domFuncs dom
      p f = prcdName f == name
  in find p fns
findFunction name dom = 
  let fns = domFuncs dom
      p f = prcdName f == name
  in find p fns