к
Size: a a a
к
к
СА
AP
toField (x:y:z:':':xs) = ([x,y,z], xs)
fmap tail . splitAt 3
AP
> fmap tail . Data.List.break (== ':') $ "foofoo:bar:bar"
("foofoo","bar:bar")
для переменной длины ключаA
AP
A
AP
fields' = ("cid", "") : fields
хехеA
AP
solve :: [Passport] -> (Int, Int)
solve ps = (length lookRight, length $ filter isValid lookRight)
where
lookRight = filter hasAllFields ps
AP
AA
A
A
p
AA
JS
fmap tail . splitAt 3
AP
ЮБ