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

Pages: 1-

(filter P S) or [x for x in S if P(x)] ???

Name: Anonymous 2011-01-04 2:15

???

Name: Anonymous 2011-01-04 2:45

dicks

Name: Anonymous 2011-01-04 2:49

The latter so that retards can understand the code.

Name: Anonymous 2011-01-04 2:52

u mena: (filter (lambda (x) P) S) or [x for x in S if P]

Name: Anonymous 2011-01-04 2:52

Lisp is not about syntax

Name: Anonymous 2011-01-04 2:55

>>3
I FUCKING HATE YOU.

Name: Anonymous 2011-01-04 2:59

>>3
Are saying, that all mathematicians are retards?

Name: Anonymous 2011-01-04 3:00

>>5
One can even conjecture that Lisp owes its survival specifically to the fact that its programs are lists, which everyone, including me, has regarded as a disadvantage. -- John McCarthy

Name: Anonymous 2011-01-04 3:09

>>7
A mathematician, if anyone, should understand simplicity and accessibility.

Name: Anonymous 2011-01-04 3:27

>>9
Why then a stereotypical mathematician is a socipathic autist, who loves uniformity. This definition, of course, excludes jewish mathematicians, as jews pursue math because of their religious views.

Name: Anonymous 2011-01-04 4:02

>>10
implying that Jewish mathematicians aren't sociopathic autists

Name: Anonymous 2011-01-04 4:20

>>11
No. Just normal people.

Name: VIPPER 2011-01-04 4:29

>>10,12
JEWS DETECTED

Name: Anonymous 2011-01-04 4:38

>>1
you mena
filter P xs
or
[x | x <- xs, P x]
?

Name: Anonymous 2011-01-04 5:05

(define-syntax for
   (syntax-rules (in collect if do)
     ((for var in list collect body) (map (lambda (var) body) list))
     ((for var in list collect body if pred) (map (lambda (var) body) (filter pred list)))
     ((for var in list do body) (for-each (lambda (var) body)))
     ((for var in list do body if pred) (for-each (lambda (var) body) (filter pred list)))))

(for x in '(1 2 3 4 5) collect (* x x)) ; => '(1 4 9 16 25)
(for x in '(1 2 3 4 5) collect (* x x) if even?) ; => '(4 16)
(for x in '(1 2 3 4 5) do (display x)) ; => #<void>, output: 12345
(for x in '(1 2 3 4 5) do (display x) if odd?) ; => #<void>, output: 135


But I use filter and map, because I'm not a faggot.

Name: Anonymous 2011-01-04 5:11

>>15
uses Lisp
"not a faggot."

wtfamireading.jpg

Name: Anonymous 2011-01-04 5:17

>>16
wtfamireading.jpg
.jpg on a textboard

backto%2fb%2f.sjis

Name: Anonymous 2011-01-04 5:45

>>17
YHBT FAGGOT. YHL. HAND.

Name: Anonymous 2011-01-04 7:39

>>18
I don't think so!

Name: Anonymous 2011-01-04 7:39

>>19
u jelly?

Name: Anonymous 2011-01-04 7:59

>>4
Any sane Lisp would have filter return a function.

Name: Anonymous 2011-01-04 8:19

>>21
no

Name: Anonymous 2011-01-04 9:07

>>1
from x in s where P(x) select x
THREAD OVER.

Name: Anonymous 2011-01-04 9:14

>>23
#reference to undefined identifier: s

Name: Anonymous 2011-01-04 10:15

grep P($_), @x

Name: Anonymous 2011-01-04 10:52

>>25
why would you even use The Variable explicitly ???

Name: Anonymous 2011-01-04 11:18

>>25
Functions considered harmful, define an operator instead.

Name: Anonymous 2011-01-04 12:23

>>26
because that's the way you do that
>>27
this isn't haskal

Name: Anonymous 2011-01-04 12:56

>>28
Functions considered harmful, define an operator instead.
this isn't haskal

Dead dogs make no distinction between the two.

Name: Anonymous 2011-01-04 12:59

>>28
this isn't haskal
Right, haskell is pure shit and doesn't have an operator for everything like Perl.

Name: Anonymous 2011-01-04 15:35

>>29
Dead dog neither functions nor operates

Name: Anonymous 2011-01-05 1:12

What's the point of haskell?

It's point-less!

Name: Anonymous 2011-01-31 19:47

<-- check em dubz

Name: Anonymous 2011-02-03 7:43

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