๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #1097

Re: How do i approach this problem?

#1097
From: Konrad Den Ende
Date: Mon, 17 Feb 2003 23:06
38 lines
2550 bytes
OK, got it. Love it. Mucho Thanko to both!

Now, i have wasted several layers of my keyboard to produce following
amazing decencies:
[ x:xs | xs <- ["123","456"] , x <- [head xs] ]
It works as i wish and special thanks to mr. Sebastian S for pointing out
that "head xs" is not a list, unless made being one.

What i don't like is that the following doesn't work:
[ x:xs | x <- [head xs] , xs <- ["123","456"] ]
since i remember reading somewhere that Hasell doesn't have variables,
but rather constants that get a value assigned upon execution, thus keeping
it to the end of the time. Correct? If so, why the error. If no, who to
kill?

As it is now, i refer to xs when defining the list from which x is to be
taken
from. Nice and neat. What should i do if i'd like to refer to x when
defining
the list from which xs are to be taken? Is it possible at all ?

--

V๏ฟฝnligen
Konrad
---------------------------------------------------
phone #1:  (+46/0) 708 - 70 73 92
phone #2: (+46/0) 704 - 79 96 95
url: http://konrads.webbsida.com
e-mail: chamsterkonrad@bigfoot.com
-----------------------------------

Sleep - thing used by ineffective people
            as a substitute for coffee

Ambition - a poor excuse for not having
                 enough sence to be lazy
---------------------------------------------------
Technical Details
Message-ID: <b2rpuk$cn6$1@news.gu.se>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!surfnet.nl!newsfeed.sunet.se!news01.sunet.se!news.chalmers.se!news.gu.se!not-for-mail
References: <b2rbba$6dc$1@news.gu.se> <Pine.GSO.4.10.10302172105080.18198-100000@licia.dtek.chalmers.se>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 107f24,a907e0b23c6eca41
X-Google-Attributes: gid107f24,public
X-Google-Thread: 10f6e0,a907e0b23c6eca41
X-Google-Attributes: gid10f6e0,public
X-Google-ArrivalTime: 2003-02-17 15:15:11 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!surfnet.nl!newsfeed.sunet.se!news01.sunet.se!news.chalmers.se!news.gu.se!not-for-mail
From: "Konrad Den Ende" <chamsterkonrad@bigfoot.com>
Newsgroups: comp.lang.functional,cth.dtek.general
Subject: Re: How do i approach this problem?
Date: Tue, 18 Feb 2003 00:06:58 +0100
Organization: Gothenburg University
Lines: 44
Message-ID: <b2rpuk$cn6$1@news.gu.se>
References: <b2rbba$6dc$1@news.gu.se> <Pine.GSO.4.10.10302172105080.18198-100000@licia.dtek.chalmers.se>
NNTP-Posting-Host: giraffen.ostkupan.studenthem.gu.se
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000