Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Procedure... proc getlabel(stream=stdin, terminator="&"): seq[string] =
- Template.... proc group[T](fn: proc: T, groupsize: int): seq[T] =
- Compile error: var x = group[seq[string]](getx, 2)
- Working call: var x = group[seq[string]](proc: seq[string] = getx(), 2)
- Can anyone explain why using getx directly doesn't work please ? The error is
- Error: type mismatch: got (proc (stream: File, terminator: string): seq[string]{.noSideEffect, gcsaf\
- e, locks: 0.}, int literal(2))
- but expected one of:
- proc (fn: proc (): seq[string]{.closure.}, groupsize: int): seq[seq[string]]{.gcsafe, locks: 0.}
Advertisement
Add Comment
Please, Sign In to add comment