Re: [frege-programming-language] FlatMap?

2016-10-08 Thread Russel Winder
On Sat, 2016-10-08 at 17:59 +0200, Dierk König wrote: > It is the classic > > = > > operator or use the "do" notation.  > For the special case of lists, a list comprehension might also be > appropriate.  > Check out FregeGoodness again.  >From what I understand >>= is not equivalent of flatMap.

Re: [frege-programming-language] Re: Is this a bug or a feature?

2016-10-08 Thread Ingo W.
> > > Is the problem that my function under test is Integer → Integer not Int > → Int or Int → Integer > Hardly, as the "function under test" needs to result in a Bool. Do you have an example? -- You received this message because you are subscribed to the Google Groups "Frege Programming

Re: [frege-programming-language] FlatMap?

2016-10-08 Thread Dierk König
It is the classic >>= operator or use the "do" notation. For the special case of lists, a list comprehension might also be appropriate. Check out FregeGoodness again. Dierk sent from:mobile > Am 08.10.2016 um 17:25 schrieb Russel Winder : > > I think I am getting a

[frege-programming-language] Input Output

2016-10-08 Thread Russel Winder
Whilst Frege has PutStr and PutstrLn, it seems to be idiomatic to use print and println instead even though this is JVM specific rather than being Haskell. I am assuming that JVM printf and all the various formatting classes are the ones to use for formatted output rather than the things in Text

Re: [frege-programming-language] Re: Is this a bug or a feature?

2016-10-08 Thread Russel Winder
On Fri, 2016-10-07 at 13:39 -0700, Ingo W. wrote: > > It seems that: Test.QuickCheckModifiers.NonNegative Integer is not: Integral Indeed, it isn't. You're supposed to extract your data in the tests like, for example: >    prop_Trivial (NonNegative n) = n >= 0 I have never