2 Mar 2001 20:00
Re: Pattern guards vs. case (was, unfortunately :Re: interesting example of laziness/ghc optimisation)
Marcin 'Qrczak' Kowalczyk <qrczak <at> knm.org.pl>
2001-03-02 19:00:17 GMT
2001-03-02 19:00:17 GMT
Thu, 1 Mar 2001 20:25:28 +0900 (KST), Laszlo Nemeth <laszlo <at> ropas.kaist.ac.kr> pisze: > > Prelude> let f x | Just _ == x = 0 in f (Just 4) > > ERROR: Illegal `_' in expression > > So it works with (Just 4), but it doesn't with (Just _)? 'Just _ == x' must be an exppression. '_' is a pattern but not an expression. -- -- __("< Marcin Kowalczyk * qrczak <at> knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK
RSS Feed