cairo
cairo copied to clipboard
feat: add function pointer
Feature Request
Describe the Feature Request
Cairo function pointer
Describe Preferred Solution
Like in Rust language ( https://doc.rust-lang.org/reference/types/function-pointer.html )
Describe Alternatives
Related Code
fn add(x: i32, y: i32) -> i32 {
x + y
}
let mut x = add(5,7);
type Binop = fn(i32, i32) -> i32;
let bo: Binop = add;
x = bo(5,7);
Additional Context
If the feature request is approved, would you be willing to submit a PR? (Help can be provided if you need assistance submitting a PR)
- [ ] Yes
- [X] No