Skip to content

Commit

Permalink
Query: Enrich the introduction (#101)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
holyjak authored Nov 19, 2021
1 parent 41b6244 commit 86904d8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 86904d8

Please sign in to comment.