
11 Oct
2006
11 Oct
'06
12:47 a.m.
2006/10/10, David Roundy
declassify :: Secret a -> String -> Maybe a declassify (Secret pw x) pw' | pw' == pw = Just x declassify (Secret _ _) _ = Nothing
Why does this works? "Yet Another Haskell Tutorial" teaches that pattern matching occurs at one stage and guard processing at other, and that there's no back (page 94). -- Felipe.