Finish UE2 A.3
This commit is contained in:
parent
ed91bdfc67
commit
31f88280e4
@ -115,8 +115,18 @@ anzahl :: DreiG_Status -> Anzahl
|
||||
anzahl (Geimpft (_, a)) = a
|
||||
|
||||
-- Dumb conversion functions
|
||||
vorname_to_str :: Vorname -> String
|
||||
vorname_to_str (Vorname v) = v
|
||||
|
||||
nachname_to_str :: Nachname -> String
|
||||
nachname_to_str (Nachname v) = v
|
||||
|
||||
person_to_string :: Person -> VorUndNachname
|
||||
person_to_string p = (show (vorname p)) ++ " " ++ (show (nachname p))
|
||||
person_to_string p =
|
||||
v ++ " " ++ n
|
||||
where
|
||||
v = vorname_to_str (vorname p)
|
||||
n = nachname_to_str (nachname p)
|
||||
|
||||
|
||||
timeFormat = "%Y-%m-%d %0I:%0M:%S %p"
|
||||
@ -317,6 +327,7 @@ einzulassende p r k = allowed_people p r k []
|
||||
|
||||
allowed_people :: Einlassbegehrende -> Regel -> Kontrollzeitpunkt -> [VorUndNachname] -> Einzulassende
|
||||
allowed_people (p:ps) r k res
|
||||
| ps == [] = res
|
||||
| (einzulassen (p, r, k)) == Einlassen = allowed_people ps r k (res ++ [person_to_string p])
|
||||
| otherwise = allowed_people ps r k res
|
||||
|
||||
|
Reference in New Issue
Block a user