Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Data structure for Propositional Logic formulas (Daniel Schoepe) 2. Re: first open source haskell project and a mystery to boot (Lorenzo Bolla) 3. Re: Data structure for Propositional Logic formulas (Christian Maeder) ---------------------------------------------------------------------- Message: 1 Date: Wed, 12 Oct 2011 23:33:51 +0200 From: Daniel Schoepe <dan...@schoepe.org> Subject: Re: [Haskell-beginners] Data structure for Propositional Logic formulas To: Alexander Raasch <i...@alexraasch.de>, beginners@haskell.org Message-ID: <874nzddhds.fsf@gilead.invalid> Content-Type: text/plain; charset="us-ascii" On Wed, 12 Oct 2011 22:58:47 +0200, Daniel Schoepe <dan...@schoepe.org> wrote: > data Formula = Literal | And ....... Sorry, that should have been: data Formula = Lit Literal | ... -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://www.haskell.org/pipermail/beginners/attachments/20111012/f245ab5f/attachment-0001.pgp> ------------------------------ Message: 2 Date: Thu, 13 Oct 2011 09:47:35 +0100 From: Lorenzo Bolla <lbo...@gmail.com> Subject: Re: [Haskell-beginners] first open source haskell project and a mystery to boot To: Alia <alia_kho...@yahoo.com> Cc: "beginners@haskell.org" <beginners@haskell.org> Message-ID: <CADjgTRxo=ut-tl_aqdidsbr8hak+a_dawmz8dp9ay+rk_j5...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi, On Wed, Oct 12, 2011 at 7:59 PM, Alia <alia_kho...@yahoo.com> wrote: > > I would appreciate if anyone could shed some light on this whimsical > problem. > > In case you are wondering why this is relevant to the beginner's forum. > Well... > > firstly, I am a beginner, and, er... the code is short enough to serve > pedagogical purposes (-; > > I'm a beginner, too, so my suggestions are not at all authoritative... > --t5 = id3 [a1,a2,a3,a4] [d1,d2,d3,d4] > Can you not use any of the techniques described here: http://haskell.org/haskellwiki/Heterogenous_collections? For example, using a tuple or dynamic types. my 2 cents, L. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20111013/0b8c608c/attachment-0001.htm> ------------------------------ Message: 3 Date: Thu, 13 Oct 2011 11:12:10 +0200 From: Christian Maeder <christian.mae...@dfki.de> Subject: Re: [Haskell-beginners] Data structure for Propositional Logic formulas To: Benedict Eastaugh <ionf...@gmail.com> Cc: beginners@haskell.org Message-ID: <4e96ab6a.2020...@dfki.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Am 12.10.2011 23:24, schrieb Benedict Eastaugh: > Hi Alex, > > since Daniel has done a nice job of actually answering your questions, > I shall just note that I have a module similar to this available on > Hackage as part of my hatt package, which generates truth tables for > formulae in classical propositional logic. > > http://hackage.haskell.org/package/hatt > http://hackage.haskell.org/packages/archive/hatt/1.3.0/doc/html/Data-Logic-Propositional.html Why do most people like duplicate or repeated code? Instead of data Expr = Variable String | Negation Expr | Conjunction Expr Expr | Disjunction Expr Expr | Conditional Expr Expr | Biconditional Expr Expr you are usually better served by: data Expr = Variable String | Negation Expr | Junct BinOp Expr Expr data BinOp = Conjunction | Disjunction | Conditional | Biconditional Cheers Christian > > Benedict > ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 40, Issue 17 *****************************************