[Haskell-beginners] consing an element to a list inside a file

kane96 at gmx.de kane96 at gmx.de
Fri Feb 19 16:13:00 EST 2010


I checked it by using :t
readCal :: IO Calendar and readCal2 :: Calendar -> IO Calendar
so the function to call (readCal) is what it should be.

thanks!



-------- Original-Nachricht --------
> Datum: Fri, 19 Feb 2010 01:54:05 +0100
> Von: kane96 at gmx.de
> An: Daniel Fischer <daniel.is.fischer at web.de>
> CC: beginners at haskell.org
> Betreff: Re: [Haskell-beginners] consing an element to a list inside a file

> ok, looks much easier and works :)
> 
> But what are now the correct signatures for the function? Normally the
> "one and only" function should be: readCal :: IO Calendar
> My function are: readCal = readCal2 datelist
> and: readCal2 datelist = do... which returns the Calendar (the list of
> dates)
> 
> 
> -------- Original-Nachricht --------
> > Datum: Fri, 19 Feb 2010 00:41:56 +0100
> > Von: Daniel Fischer <daniel.is.fischer at web.de>
> > An: kane96 at gmx.de
> > CC: beginners at haskell.org
> > Betreff: Re: [Haskell-beginners] consing an element to a list inside a
> file
> 
> > Am Freitag 19 Februar 2010 00:25:18 schrieb kane96 at gmx.de:
> > > ok, now I did it by just calling from the original function by to a
> new
> > > one with an empty list at the beginning.
> > >
> > > How can I add the date at the end of the list? By creating a new list
> > > from the new date and using concat or is there a simpler way?
> > >
> > 
> > Better stick it to the front by (:) and reverse the list just before 
> > printing.
> 
> -- 
> NEU: Mit GMX DSL über 1000,- ¿ sparen!
> http://portal.gmx.net/de/go/dsl02
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01


More information about the Beginners mailing list