# Pastebin PUlgPdwO ❯ cat test.go package main // typedef void (*cb)(int); // static void helper(cb f, int x) { f(x); } import "C" //export highorder func highorder(cb_p C.cb) { C.helper(cb_p, 42) } func main() {} ❯ go build -o test.so -buildmode=c-shared test.go ❯ raku -e 'use NativeCall; sub highorder(&cb (uint64)) is native("./test.so") {*}; highorder(sub (uint64 $a) { say $a })' 42