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

Haskell <- list comprehension

Name: Anonymous 2009-04-04 5:42

So, is the <- in Haskell list comprehension an arrow (as in, ``take the x from''), or does it imitate the character from the mathematical set notation?
e.g. {x2 : x ∈ ℕ} and [x | x <- [0,1..]]).

Name: Anonymous 2009-04-04 5:43

Oops, forgot the ^2.

Name: Anonymous 2009-04-04 5:54

>>2
You could easily deduce which if you were competent with set notation. If it did mean where x is a member of the set, then repeated elements of the array would only be taken once.

Name: Anonymous 2009-04-04 6:37

array
Where did that come from?

Name: Anonymous 2009-04-04 9:53

>>4
To be fair, Haskell lists are also arrays.

Name: Anonymous 2009-04-04 10:45

>>5
No, they are not.

Name: Anonymous 2009-04-04 12:17

>>6
My Haskell array is long, hard, and makes it very enjoyable to thrust into my cute japanese girlfriend.

Name: Anonymous 2009-04-04 12:17

>>7
pics or it didn't happen

Name: Anonymous 2009-04-04 13:19

Name: Anonymous 2009-04-04 13:35

>>6
Define array, then.

Name: Anonymous 2009-04-04 13:41

>>10
2 an ordered arrangement, in particular

Computing an ordered set of related elements.

Haskell lists are not sets, ∴ they are not arrays.

Name: Anonymous 2009-04-04 13:43

>>9
LOL, the kid in the background is looking at him like he's a child molester. Mind you, he probably is.

Name: Anonymous 2009-04-04 15:04

>>12
LOL, I looked at the kid in the background like I'm a child molester. Mind you, I am.

Name: Anonymous 2009-04-04 15:13

>>13
child molesters? In my /prog/?

Name: Anonymous 2009-04-04 15:16

>>14
Back to /b/, please.                 

Name: Anonymous 2009-04-04 15:26

Let's talk about some kind of HASKELL web interface. I want to make a /prog/ thread updater.

Name: Anonymous 2009-04-04 16:31

>>12
because only a child molester would be sitting there looking like an idiot instead of raping that kid, right?

Name: Anonymous 2009-04-04 16:52

>>1
use prolog.

>>11
http://foldoc.org/index.cgi?query=array&action=Search
A collection of identically typed data items distinguished by their indices (or "subscripts"). The number of dimensions an array can have depends on the language but is usually unlimited.

http://foldoc.org/index.cgi?lists
A data structure holding many values, possibly of different types, which is usually accessed sequentially, working from the head to the end of the tail - an "ordered list".

Name: HAXUS THE GREAT 2009-04-04 17:02

HAXUS THE GREAT

Name: Anonymous 2009-04-05 7:11

>>18
You failed to miss the most important point, which is that arrays are random-access and lists have to be traversed¹. It is quite possible to have heterogenous arrays, see Scheme's vector² type for an example.

References/Footnotes
¹ Haskell's lists can be accessed by index with the !! function, but that is implemented by list traversal³.
² Sussman, G.J.; Steele Jr., G.L.; Abelson, H. “Revised5 Report on the Algorithmic Language Scheme”, http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.3.6 -- 1998-02-20, retrieved 1993-09-5695.
³ http://haskell.org/ghc/docs/latest/html/libraries/base/src/GHC-List.html#!!

Name: Anonymous 2009-04-05 9:25

>>9,12
She's cute.

Name: Anonymous 2009-04-05 10:12

>>21
Why don't you go molest her already.

Name: Anonymous 2009-04-05 10:22

>>22
Why would I?

Name: Anonymous 2009-04-06 14:16

>>20
Revised[5]
Hi, you forgot your fifth footnote.

>>12
Melonpan is not a child molester, you rude person, you!

http://www.meidocafe.jp/about-me-de-arimasu/

Name: ​​​​​​​​​​ 2010-09-09 10:25

Name: Anonymous 2010-12-27 1:01

Name: Anonymous 2011-02-03 7:51

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