Thanks, but seems like it's not compiling..., do I miss something? import strformat, sugar proc map_csv[T]( csv_file_path: string, map: ( row: (key: string) -> string ) -> T ): seq[T] = for i in 1..3: result.add map(proc (key: string): string = fmt"{key} {i}") result proc load_companies2(): seq[string] = map_csv("companies.csv", (row) => block: let v = row("symbol") v ) Run
- How to write multi-line sugar => and sugar do? alexeypetrushin
- How to write multi-line sugar => and sugar do? shirleyquirk
- How to write multi-line sugar => and sugar do? alexeypetrushin