diff --git a/Readme.org b/Readme.org index 1e353083..d3e22701 100644 --- a/Readme.org +++ b/Readme.org @@ -150,7 +150,8 @@ may be both: #+end_src A receiver whose type cannot be worked out --- something out of a header -nothing has parsed --- is read as a value, with a warning saying so. +nothing has parsed --- is read as a value, with a warning saying so. For a +pointer there, ~(%-> p x)~ writes ~p->x~ whatever ~p~ is. A method is ~(.name receiver args ...)~ and a field is ~(. receiver name)~, so the shape of a form says which of the two it is without diff --git a/tests/sex-programs/worked-example.sex b/tests/sex-programs/worked-example.sex index 81956473..4ecc184e 100644 --- a/tests/sex-programs/worked-example.sex +++ b/tests/sex-programs/worked-example.sex @@ -16,6 +16,7 @@ (ops expr (pub fn eval ((self (* const expr))) float + ;; v, e, l and r are copies of the fields, not references to them (match (* self) ((lit (v)) (return v)) ((neg (e)) (return (- (.eval e))))