Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

think of a better name than fold/hash-table

Name: Anonymous 2007-11-30 14:12

;; 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))

Name: Anonymous 2007-11-30 14:16

;; 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))

Name: Anonymous 2007-11-30 14:20

foldHashTable

Name: Anonymous 2007-11-30 14:21

wtf haskell

Name: Anonymous 2007-11-30 14:27

You don't need this.

Name: Anonymous 2007-11-30 14:48

fold-hash-table

Name: Anonymous 2007-11-30 14:52

>>1,2

`initial'

I found your problem.

Name: Anonymous 2007-11-30 15:30

tash-fable-hald?

Name: Anonymous 2007-11-30 16:40

steal girl, fuck pizza, eat bike

Name: Anonymous 2007-11-30 17:44

scheme faggot

Name: Anonymous 2007-11-30 17:45

>>10
feem schaggot

Name: Anonymous 2007-11-30 18:20

the lack of multiline comments

/thread over

Name: Anonymous 2007-11-30 18:38

>>12
One word, #|foo|#, thread continues.

Name: Anonymous 2007-11-30 19:10

>>13
The lack of multiline comments that don't look like shit.

/thread over

Name: Anonymous 2007-11-30 19:14

ONE WORD, LOTS OF SILLY IRRITATING PARANTHESIS THREAD OVER

Name: Anonymous 2007-11-30 19:45

>>14
Try Haskell if you want to know what kind of comments look like shit.

Name: Anonymous 2007-11-30 20:49

You guys know that your documentation comments can simply be written as strings, right?

Name: Anonymous 2007-11-30 21:38

>>17
Documentation strings aren't necessarily implementation standard.

Name: Anonymous 2007-12-01 17:06

>>18
and? what bearing does that have on anything fagot?

Name: Anonymous 2007-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: Anonymous 2007-12-01 18:23

>>20
comments get discarded or ignored before runtime. strings form part of the binary.

Name: Anonymous 2007-12-01 18:29

>>21
Don't be stupid. Who would write a compiler like that?

Name: Anonymous 2007-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

Name: Anonymous 2009-03-18 2:12

I feel the need, the need for weed!

Marijuana MUST be legalized.

Don't change these.
Name: Email:
Entire Thread Thread List