[Haskell-cafe] f(g(x), h(y)) - Correct syntax
Henning Thielemann
lemming at henning-thielemann.de
Mon Feb 11 09:42:18 EST 2008
On Mon, 11 Feb 2008, news at lyra.net wrote:
> Hallo!
>
> I have this code:
> ----------------------------------------
> q1 :: EName -> [ApprenticeInfo]
> q1 c = [apprenticeInfo n | n <- allApprentices, member ((sq4
> c) (firstOf5(n))) == True]
>
> sq4 :: ESurname -> [IDB]
> sq4 c = (sq3 (sq1 (c)))
>
> firstOf5 :: (a,b,c,d,e) -> a
> firstOf5 (n,_,_,_,_) = n
>
> member :: [IDB] -> IDB -> Bool
> member [] y = False
> member(x:xs) y = (x==y) || member xs y
cf. List.elem
More information about the Haskell-Cafe
mailing list