Created
February 21, 2020 02:37
-
-
Save bpringe/95f00cde1c2f1f958fcc3a1d045507ba to your computer and use it in GitHub Desktop.
Describes the `coor` field of a need-debug-input nrepl response from cider-nrepl middleware
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COORDINATES is a list of integers that specify how to navigate into the | |
sexp that is after point when this function is called. | |
As an example, a COORDINATES list of '(1 0 2) means: | |
- enter next sexp then `forward-sexp' once, | |
- enter next sexp, | |
- enter next sexp then `forward-sexp' twice. | |
In the following snippet, this takes us to the (* x 2) sexp (point is left | |
at the end of the given sexp). | |
(letfn [(twice [x] | |
(* x 2))] | |
(twice 15)) | |
In addition to numbers, a coordinate can be a string. This string names the | |
key of a map, and it means \"go to the value associated with this key\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment