-
|
Fantastic language. I've ported some Go scripts to Lisette. Working with Lisette is a breeze. I'm struggling with a simple slice concatenation. How is something like this possible? Also tested and other common approaches. Help highly appreciated. Thanks, guys. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
If i understood correctly you want to concatenate two slices? Go has a function for this: import "go:slices"
fn main() {
let a = [1, 2, 3]
let b = [4, 5, 6]
let merged = slices.Concat(a, b)
for item in merged {
// do stuff
}
} |
Beta Was this translation helpful? Give feedback.
-
|
Gosh! Sorry for asking this - and thank you very much for your answer. Very interesting to see and learn which parts are 'Lisette-native' and which parts come from Go (modules). |
Beta Was this translation helpful? Give feedback.
-
|
Had read the docs before but just found out about shows:
That's the Lisette way, and it works like a charm with JSON data. Had tried
Everything astonishingly mature for such a young language. Congratulations! |
Beta Was this translation helpful? Give feedback.
If i understood correctly you want to concatenate two slices?
Go has a function for this: