Skip to content

Instantly share code, notes, and snippets.

@bpringe
Created February 21, 2020 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bpringe/95f00cde1c2f1f958fcc3a1d045507ba to your computer and use it in GitHub Desktop.
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
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