
2 Jun
2009
2 Jun
'09
6:59 p.m.
hi there heres a code snipped, don't care about the parameters. the thing is i make a lookup on my map "m" and then branch on that return value probePhase is sc [] m = [] probePhase is sc (x:xs) m | val == Nothing = probePhase is sc xs m | otherwise = jr ++ probePhase is sc xs m where jr = joinTuples sc x (fromMaybe [] val) key = getPartialTuple is x val = Map.lookup key m the line "jr = joinTuples sc x (fromMaybe [] val)" is kind of ugly because i know that it is not Nothing. is there a better way to solve this? regards