Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct vec2 (x, y);
- def vec2_add(a, b) {
- vec2(a.x + b.x, a.y + b.y);
- }
- def main() {
- x = [1, 2, 3];
- print("hi! length of x is #{len(x)}");
- z = lambda(n) { n*2 };
- y = vec2(1, 5);
- print(vec2_add(vec2(1, 1), y)); // prints <vec2 x=2 y=6>
- }
- main();
Add Comment
Please, Sign In to add comment