🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #1095

Re: How do i approach this problem?

#1095
From: nospm
Date: Mon, 17 Feb 2003 19:44
15 lines
1467 bytes
In article <b2rbba$6dc$1@news.gu.se>,
	"Konrad Den Ende" <chamsterkonrad@bigfoot.com> writes:
> ... many whitespace
> loudly at my computer and kicking a garbage can) this:
> [x:xs | xs <- [[1,2,3],[4,5,6]], x <- head xs]

> ...
> I ment the outcome to be [[1,1,2,3],[4,4,5,6]] and i have two questions.

ever tried:
Prelude> map (\x->head x:x) [xs | xs <-[[1,2,3],[4,5,6]] ]
[[1,1,2,3],[4,4,5,6]]

hope it would help :)
-Philip
Technical Details
Message-ID: <b2re27$td5$01$1@news.t-online.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail
References: <b2rbba$6dc$1@news.gu.se>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
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 11:46:03 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail
From: nospm@uni-koblenz.de
Newsgroups: comp.lang.functional,cth.dtek.general
Subject: Re: How do i approach this problem?
Date: Mon, 17 Feb 2003 20:44:08 +0100
Organization: T-Online
Lines: 15
Sender: philip@uni-koblenz.de
Message-ID: <b2re27$td5$01$1@news.t-online.com>
References: <b2rbba$6dc$1@news.gu.se>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.t-online.com 1045511048 01 30117 7SWhEP-XS3ApiN 030217 19:44:08
X-Complaints-To: abuse@t-online.com
X-Sender: 320053041887-0001@t-dialin.net
X-Newsreader: knews 1.0b.1