You could also roll your own one pass template thing easily enough:
    
    
    import tables
    let tab = {"foo": 1, "bar": 2}.toTable
    
    template foldl(itr, updateAwithB, first): untyped =
      var a {.inject.} = first
      for b {.inject.} in itr: updateAwithB
      a
    
    echo foldl(tab.values, a += b, 0)
    
    
    Run

`sequtils.foldl` does not quite work this way (it wants `items(tab.values)` to 
work which does not).

Reply via email to