Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: Enrich the introduction #101

Merged
merged 1 commit into from
Nov 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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