3 ms·
In case anyone else is confused by what the functions named "oval" and "snot" mean in the following example: > (cond ((eq (oval pi) pie) (oval (snot pie pi))
by susam 2y ago
In case anyone else is confused by what the functions named "oval" and "snot" mean in the following example:
> (cond ((eq (oval pi) pie) (oval (snot pie pi)))
(t (eval (snoc (rac pi) pi))))
I realised after a few seconds that they are meant to be "eval" and "snoc" instead. The above code should be written as the following instead:
(cond ((eq (eval pi) pie)
(eval (snoc pie pi)))
(t (eval (snoc (rac pi) pi))))
This article has been a fascinating read, by the way. Kudos to the maintainer of the Gist post. I am also sharing these corrections as comments on the Gist post.
EDIT #1: Downloaded a copy of the original Scientific American article from https://www.jstor.org/stable/24968822 https://www.jstor.org/stable/24968822 and confirmed that indeed the functions "oval" and "snot" are misspellings of "eval" and "snoc".
EDIT #2: Fixed typo in this comment highlighted by @fuzztester below.
- hinkley 2y agoOCR maybe?
- lionkor 2y agomaybe LLM "reformat/rewrite this"?
- fuzztester 2y ago>confirmed that indeed the functions "oval" and "snot" are misspellings of "eval" and "snot". Correction of your correction: confirmed that indeed the functions "oval" and "snot" are misspellings of "eval" and "snoc". And I guess snoc is cons reversed and rac is car reversed.
- susam 2y ago> Correction of your correction Thanks! Fixed. > And I guess snoc is cons reversed and rac is car reversed. Indeed! That's exactly how those functions are introduced in the article. Quoting from the article: > The functions rdc and snoc are analogous to cdr and cons, only backwards.
- Xen9 2y agore: riccar e https://it.m.wikipedia.org/wiki/Ricercare https://it.m.wikipedia.org/wiki/Ricercare