I tried it option autoconverter, but it doesn't work, for example this code 
would fail
    
    
    import options, sugar, sequtils
    
    converter to_option*[T](t: T): Option[T] = some(t)
    
    template pick*[T](list: openarray[T], field: untyped): untyped =
      list.map((v) => v.`field`)
    
    echo @[(name: "John"), (name: "Sarah")].pick(name)
    
    
    Run

Reply via email to