This file is indexed.

/usr/lib/s9fes/help/force is in scheme9 2010.11.13-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
R4RS 6.9  (force promise)     ==>  object
          (delay expression)  ==>  promise

FORCE forces the value of PROMISE (see DELAY, section see section
4.2.5 Delayed evaluation). If no value has been computed for the
promise, then a value is computed and returned. The value of the
promise is cached (or "memoized") so that if it is forced a second
time, the previously computed value is returned.

(force (delay (+ 1 2)))        ==>  3
(let ((p (delay (+ 1 2))))
  (list (force p) (force p)))  ==>  (3 3)

(define a-stream
  (letrec ((next (lambda (n)
                   (cons n (delay (next (+ n 1)))))))
    (next 0)))
(define head car)
(define (tail stream) (force (cdr stream)))
(head (tail (tail a-stream)))                ==>  2

FORCE and DELAY are mainly intended for programs written in functional
style. The following examples should not be considered to illustrate
good programming style, but they illustrate the property that only
one value is computed for a promise, no matter how many times it
is forced.

(define count 0)
(define p
  (delay (begin (set! count (+ count 1))
                (if (> count x)
                    count
                    (force p)))))
(define x 5)
p                    ==>  a promise
(force p)            ==>  6
p                    ==>  a promise, still
(begin (set! x 10)
       (force p))    ==>  6

Here is a possible implementation of DELAY and FORCE. Promises are
implemented here as procedures of no arguments, and FORCE simply
calls its argument:

(define force
  (lambda (object)
    (object)))

We define the expression

(delay <expression>)

to have the same meaning as the procedure call

(make-promise (lambda () <expression>)),

where make-promise is defined as follows:

(define (make-promise proc)
  (let ((result-ready? #f)
        (result #f))
    (lambda ()
      (if result-ready?
          result
          (let ((x (proc)))
            (if result-ready?
                result
                (begin (set! result-ready? #t)
                       (set! result x)
                       result)))))))

Rationale: A promise may refer to its own value, as in the last
example above. Forcing such a promise may cause the promise to be
forced a second time before the value of the first FORCE has been
computed. This complicates the definition of make-promise.

Various extensions to this semantics of DELAY and FORCE are supported
in some implementations:

- Calling FORCE on an object that is not a promise may simply
  return the object.
- It may be the case that there is no means by which a promise
  can be operationally distinguished from its forced value. That
  is, expressions like the following may evaluate to either #T or
  to #F, depending on the implementation:

  (eqv? (delay 1) 1)          ==>  unspecified
  (pair? (delay (cons 1 2)))  ==>  unspecified

- Some implementations may implement "implicit forcing," where
  the value of a promise is forced by primitive procedures like
  cdr and +:

  (+ (delay (* 3 7)) 13)  ==>  34

S9fES does not implement implicit forcing.