nx_fn_ptr_test.nx
buildroot/runtime/nx_fn_ptr_test.nx
about
nx_fn_ptr_test.nx -- exercise first-class function pointers.
dependencies 1 imports · 0 importers
imports: nx_kernel_v2.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 5 | func add(a: nx_int, b: nx_int) -> nx_int { return a + b } |
| 6 | func sub(a: nx_int, b: nx_int) -> nx_int { return a - b } |
| 7 | func mul(a: nx_int, b: nx_int) -> nx_int { return a * b } |
| 8 | func neg_x(a: nx_int, b: nx_int) -> nx_int { return -a } |
| 11 | func t1_basic_indirect() -> nx_int called by 1: main |
| 19 | func t2_reassign() -> nx_int called by 1: main |
| 34 | func apply_op(op: func(nx_int, nx_int) -> nx_int, a: nx_int, b: nx_int) -> nx_int called by 1: t3_higher_order |
| 38 | func t3_higher_order() -> nx_int |
| 46 | func main() -> nx_exit |