Re: [Haskell-cafe] Noob question about list comprehensions

2011-02-16 Thread Stephen Lavelle
Might better ways, but the following work: length [c | x <- [1..100], let c = chain x , length c > 15] length [c | x <- [1..100], c <- [chain x] , length c > 15] On Wed, Feb 16, 2011 at 9:19 AM, Tako Schotanus wrote: > Hello, > > I was going through some of the tuturials and trying out differe

Re: [Haskell-cafe] Restrictions on associated types for classes

2009-12-17 Thread Stephen Lavelle
Ah yes, this is very very very helpful. Thanks : ) Miguel's example is not quite as idiomatic, but...for some reason I find it beguiling nonetheless. On Thu, Dec 17, 2009 at 2:36 PM, Roman Leshchinskiy wrote: > On 18/12/2009, at 00:37, Stephen Lavelle wrote: > >> Given >

[Haskell-cafe] Restrictions on associated types for classes

2009-12-17 Thread Stephen Lavelle
Given class MyClass k where type AssociatedType k :: * Is there a way of requiring AssociatedType be of class Eq, say? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe