;; Walks along `list' and for each item calls `proc' with the current item and a value
;; from the hash-table, the key of which is based on calling `identifier` with the
;; current item. The initial value for each hash-table entry is based on calling
;; `initial' on the first item satisfying `identifier'. The return value of `proc'
;; is used to set the hash-table entry.
(define (fold/hash-table list identifier proc initial)
(let ((table (make-hash-table 'equal)))
(for-each
(lambda (item)
(let* ((key (identifier item))
(new-value (proc item (hash-table-get table key (initial item)))))
(hash-table-put! table key new-value)))
list)
table))
;; Walks along `list' and for each item calls `proc' with the current item and a value
;; from the hash-table, the key of which is based on calling `identifier` with the
;; current item. The initial value for each hash-table entry is based on calling
;; `initial' on the first item satisfying `identifier'. The return value of `proc'
;; is used to set the hash-table entry.
(define (fold/hash-table list identifier proc initial)
(let ((table (make-hash-table 'equal)))
(for-each
(lambda (item)
(let* ((key (identifier item))
(new-value (proc item (hash-table-get table key (initial item)))))
(hash-table-put! table key new-value)))
list)
table))
>>18
and? what bearing does that have on anything fagot?
Name:
Anonymous2007-12-01 17:20
>>18
No, I mean comments that are intended to document stuff rather than to temporarily remove code. You can just throw strings in wherever you like in a lot of cases, and they will have no effect.
Name:
Anonymous2007-12-01 18:23
>>20
comments get discarded or ignored before runtime. strings form part of the binary.
Name:
Anonymous2007-12-01 18:29
>>21
Don't be stupid. Who would write a compiler like that?
Name:
Anonymous2007-12-01 19:25
PULL OUT THE PLUG AND WET HIM ALL OVER
PULL OUT THE PLUG AND WET HIM ALL OVER
PULL OUT THE PLUG AND WET HIM ALL OVER
EARLY IN THE MORNING