Open BertLisser opened 11 years ago
Hello BertLisser,
All built in Haskell functions can be found in the documentation: For example: http://hackage.haskell.org/package/HaskellForMaths-0.4.5/docs/src/Math-Combinatorics-Poset.html#isTransitive
For the trClosHelper, since we use the @@ it could never be a one-liner right? As that is already 3 lines on its own. Or what exactly do you mean?
All built in Haskell functions can be found in the documentation: For example: http://hackage.haskell.org/package/HaskellForMaths-0.4.5/docs/src/Math-Combinatorics-Poset.html#isTransitive Thank you for the tip. But why didn't you use this. For the trClosHelper, since we use the @@ it could never be a one-liner right? As that is already 3 lines on its own. Or what exactly do you mean?
I mean for example this: trClos :: Ord a => Rel a -> Rel a trClos x = lfp (\ x -> nub (x ++ (x @@ x))) x
I admit that this solution requires a lot of experience in functional programming.
Kind Regards
Bert
----- Original Message ----- From: "Tessmore" notifications@github.com To: "Tessmore/gr_v4" gr_v4@noreply.github.com Cc: "BertLisser" Bert.Lisser@cwi.nl Sent: Saturday, October 5, 2013 5:45:15 PM Subject: Re: [gr_v4] Week 4: if you have read this and you have no questions, please close this issue. (#1)
Hello BertLisser,
For the trClosHelper, since we use the @@ it could never be a one-liner right? As that is already 3 lines on its own. Or what exactly do you mean?
Reply to this email directly or view it on GitHub: https://github.com/Tessmore/gr_v4/issues/1#issuecomment-25750846
Thanks. I will look into it!
Opg 5
Where do you find this en why didn't you use this? However the definition of isTransitive is very nice.
Opg 4
is OK, but the definition can be shorter and more optimal (even an one liner).