Re: [Haskell] Replacing and improving pattern guards with PMC syntax

2 Oct
2006
2 Oct
'06
7:59 a.m.
Brandon Moore
Maybe the '\' could be reiterated to introduce the layout group:
take' = \ 0 _ -> [] n \[] -> [] (x:x) -> x : take (pred n) xs
Definitely not, since the lambda gets us back into expressions, destroying the fall-through properties of matchings. (In this particular case this is no problem, but in general it would destroy fall-through.)
alt -> match exp with alts Maybe reuse "case", unless a new keyword is needed to avoid confusion.
We definitely need this construct to produce a matching (or ``alt''). If we use ``case'' here, then case expressions don't exist anymore. Wolfram
6805
Age (days ago)
6805
Last active (days ago)
0 comments
1 participants
participants (1)
-
kahl@cas.mcmaster.ca