{"body":"❯ cat test.go\npackage main\n\n// typedef void (*cb)(int);\n// static void helper(cb f, int x) { f(x); }\nimport \"C\"\n\n//export highorder\nfunc highorder(cb_p C.cb) {\n\tC.helper(cb_p, 42)\n}\nfunc main() {}\n❯ go build -o test.so -buildmode=c-shared test.go\n❯ raku -e 'use NativeCall; sub highorder(&cb (uint64)) is native(\"./test.so\") {*}; highorder(sub (uint64 $a) { say $a })'\n42","name":"Sorry... I'm just happy it worked...","extension":"txt","url":"https://www.irccloud.com/pastebin/PUlgPdwO/Sorry...+I%27m+just+happy+it+worked...","modified":1726882167,"id":"PUlgPdwO","size":377,"lines":15,"own_paste":false,"theme":"","date":1726882167}