mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
12 lines
195 B
Nim
Executable File
12 lines
195 B
Nim
Executable File
type
|
|
TProc = proc (n: int, m: openarray[int64])
|
|
|
|
proc Foo(x: int, P: TProc) =
|
|
P(x, [ 1'i64 ])
|
|
|
|
proc Bar(n: int, m: openarray[int64]) =
|
|
echo($n & " - " & repr(m))
|
|
|
|
Foo(5, Bar) #OUT 5 - [1]
|
|
|