From d790a3cca5309d86d752bb99a1eeaf3b6ee9c71b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 14 Apr 2016 19:53:31 -0700 Subject: Remove @(do) from Lisp examples. * txr.1: example for delay and gen doesn't need @(do). --- txr.1 | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/txr.1 b/txr.1 index bd0e5b46..a211b1e2 100644 --- a/txr.1 +++ b/txr.1 @@ -16617,20 +16617,19 @@ only retrieve a cached value. .TP* Example: .cblk - @(do - ;; list is popped only once: the value is computed - ;; just once when force is called on a given promise - ;; for the first time. + ;; list is popped only once: the value is computed + ;; just once when force is called on a given promise + ;; for the first time. - (defun get-it (promise) - (format t "*list* is ~s\en" *list*) - (format t "item is ~s\en" (force promise)) - (format t "item is ~s\en" (force promise)) - (format t "*list* is ~s\en" *list*)) + (defun get-it (promise) + (format t "*list* is ~s\en" *list*) + (format t "item is ~s\en" (force promise)) + (format t "item is ~s\en" (force promise)) + (format t "*list* is ~s\en" *list*)) - (defvar *list* '(1 2 3)) + (defvar *list* '(1 2 3)) - (get-it (delay (pop *list*)))) + (get-it (delay (pop *list*))) Output: @@ -17281,12 +17280,11 @@ stands for Generate Until Null. .TP* Example: .cblk - @(do - ;; Make a lazy list of integers up to 1000 - ;; access and print the first three. - (let* ((counter 0) - (list (gen (< counter 1000) (inc counter)))) - (format t "~s ~s ~s\en" (pop list) (pop list) (pop list)))) + ;; Make a lazy list of integers up to 1000 + ;; access and print the first three. + (let* ((counter 0) + (list (gen (< counter 1000) (inc counter)))) + (format t "~s ~s ~s\en" (pop list) (pop list) (pop list))) Output: 1 2 3 -- cgit v1.2.3