diff options
-rw-r--r-- | src/qgs.gleam | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/qgs.gleam b/src/qgs.gleam index dacd6ed..9c5e4c2 100644 --- a/src/qgs.gleam +++ b/src/qgs.gleam @@ -1,5 +1,16 @@ import gleam/io +import gleam/javascript/array +import gleam/json +import gleam/list pub fn main() { - io.println("Hello from qgs!") + [1, 2, 3] + |> list.map(fn(x) { x + 1 }) + |> list.zip(["2", "3", "4"], _) + |> array.from_list + |> array.map(fn(t) { #(t.0, t.1 |> json.int) }) + |> array.to_list + |> json.object + |> json.to_string + |> io.println } |