Data update

This commit is contained in:
Ingy döt Net 2023-09-01 09:35:06 -07:00
parent 61b93a2cd1
commit 5af6d93694
858 changed files with 20572 additions and 2082 deletions

View file

@ -0,0 +1,13 @@
include "std-list.ldpl"
data:
arr1 is number list
arr2 is number list
procedure:
push 1 to arr1
push 2 to arr1
push 3 to arr2
push 4 to arr2
append list arr2 to list arr1
display list arr1

View file

@ -0,0 +1,15 @@
package main
import "core:fmt"
import "core:slice"
main :: proc() {
x: [3]int = {1, 2, 3}
y: [3]int = {4, 5, 6}
xy: [len(x) + len(y)]int
copy(xy[:], x[:])
copy(xy[len(x):], y[:])
fmt.println(xy)
}

View file

@ -0,0 +1,14 @@
package main
import "core:fmt"
import "core:slice"
main :: proc() {
x: [3]int = {1, 2, 3}
y: [3]int = {4, 5, 6}
xy := slice.concatenate([][]int{x[:], y[:]})
defer delete(xy)
fmt.println(xy)
}