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

Help [scheme]

Name: Anonymous 2008-01-27 7:29


(define (read-file port)
  (lambda (line)
    (if line
        (begin
        (display line)
        (read-file port))))
  (read-line port))

(call-with-input-file 'file read-file) ; doesnt work


y doesnt work ;_;

Name: Anonymous 2008-01-27 7:49

ONE WORD:
THE LACK OF PROPER INDENTATION OF CODE

THREAD OVER

Name: Anonymous 2008-01-27 8:07

that lambda right there fails hard

Name: Anonymous 2008-01-27 8:14

>>3
Either the lambda or the syntatic sugar that anti-cudder Abelson likes.

Do the pure (define read-file (labda (port) ...)

Name: Anonymous 2008-01-27 8:19

OP here whoa you faggots are either trolling or you are fucking clueless.

>>3
I prefer it instead of let

>>4
Irrelevant.

Name: Anonymous 2008-01-27 8:53

>>5
I prefer it instead of let
Hard troller trolls hard.

Name: Anonymous 2008-01-27 8:56

>>6
please explain

Name: Anonymous 2008-01-27 9:17

Somehow i get this feeling that you faggots posting ``read SICP'' are Java faggots in their uni.

Name: Anonymous 2008-01-27 9:24

call/cc and other continuation operators considered harmful.

Name: Anonymous 2008-01-27 10:19

Use proper quotes.

Name: Anonymous 2008-01-27 10:19

>>5
lol you idiot

Name: Anonymous 2008-01-27 10:20

Just.. read... SICP, fucks sake

Name: Java faggots in their uni 2008-01-27 10:29

``read SICP''

Name: Anonymous 2008-01-28 8:20

bump faggots

Name: Anonymous 2008-01-28 8:28

(apply sicp your-code)

Name: Anonymous 2008-01-28 8:33

“read SICP”

Name: Anonymous 2008-01-28 12:51

so, why?

Name: Anonymous 2008-01-28 13:11

>>17
If you don't know why, clearly you've got to read SICP

Name: Anonymous 2008-01-28 13:13

i cant believe im asking a fucking scheme question here and i get no replies

Name: Anonymous 2008-01-28 13:16

>>19 Idiot!
You question was already answered.

IHBT, I know

Name: Anonymous 2008-01-28 13:19

>>20
''read SICP'' no shit.
god dammit you faggots i wish you didn't fucking scream YHBT IHBT all the godamn fucking time.
/prog/ was good, until retards came here thinking they are real trolls.

Name: Anonymous 2008-01-28 13:27

>>21
So, are you a real troll?

Name: Anonymous 2008-01-28 13:30

>>22

Nah, he's just an idiot.  Real trolls use proper spelling and `proper quotes'.

Name: Anonymous 2008-01-28 13:41

bump

Name: Anonymous 2008-01-29 6:18

bump.

Name: Anonymous 2008-01-29 6:58

bump answer fucgk you

Name: Anonymous 2008-01-29 10:04

bump

Name: Anonymous 2008-01-29 11:44

2008-01-29 10:04

    bump

Name: Anonymous 2008-01-29 11:52

>>24-28
sage

Name: Anonymous 2008-01-29 12:45



28 Name: Anonymous : 2008-01-29 11:44

    2008-01-29 10:04

        bump

29 Name: Anonymous :

Name: Anonymous 2008-01-29 12:54


        bump

Name: Anonymous 2008-01-29 14:01

(define (read-file port)
  ((lambda (line)
     (if (not (eof-object? line))
         (begin
           (display line)
           (newline)
           (read-file port))))
   (read-line port)))

(call-with-input-file "/etc/hosts" read-file)
##
# Host Database
##
127.0.0.1    localhost
255.255.255.255    broadcasthost
::1             localhost
fe80::1%lo0    localhost

There, fixed your shitty code. Could be better, but I wanted to be as close to you FAIL code as possible.

Name: Anonymous 2008-01-29 14:01

Also: bump

Name: Anonymous 2008-01-29 14:05

>>32
Ah, fuck.
read-line doesn't evaluate to nil on EOF eh.. fuck.
thanks, what would be a better way to read a file line by line?

(for further line processing)

Anyway, I won't bump this again since someone FUCKING ANSWERED. WOO WOO.

Name: Anonymous 2008-01-29 14:13

NIGGER PENUS OM NOM NOM NOM

8==========================D

Name: Anonymous 2008-01-29 14:51

HAX?

Name: Anonymous 2010-11-15 0:29

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