From 86904d8f94dad5c50338df1cfb810e26080595bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Hol=C3=BD?= Date: Fri, 19 Nov 2021 11:30:06 +0100 Subject: [PATCH] Query: Enrich the introduction (#101) This change makes the Intro - IMO - a much more useful overview and quick reference. It lifts up and highlights some key, frequently needed info from the tutorial. --- doc/query.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/query.md b/doc/query.md index 3b2a0ba..edbfe4e 100644 --- a/doc/query.md +++ b/doc/query.md @@ -26,6 +26,13 @@ These Clojure-like functions are supported in jet-lang: - copy the entire input value: `identity` (for short `id`, thanks Haskell). - print the result of an intermediate query: `jet/debug`. - arithmetic: `+`, `-`, `*`, `/`, `inc`, `dec`. +- integers, keywords, and strings lookup up a value in the input (that's whe we need `#jet/lit`) + +All these functions have an implicit _input_ argument. + +To pass the input through a sequence of queries, just put them inside a vector. +Thus `[:user :name]` will get the name of the user inside the input. (You can omit +the vector for the top-level query.) To learn more about how to use them, read the [tutorial](#tutorial) or go straight to the [gallery](#gallery).