We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am currently doing day 4 of adventofcode.com
Much of the job is just text parsing and I managed to do it with a nice "one-liner" thanks to this very neat package!
is_valid(pass) = (length(pass) == 8) | ((length(pass) == 7) & ("cid" ∉ pass)) sol = @chain "./data/passport.txt" begin read(_, String) split(_, "\n\n") map(x -> replace(x, "\n" => " "), _) map(x -> split(x, " "), _) map(x -> map(y -> split(y, ":")[1], x), _) filter(is_valid, _) length end
However, I found the maps and the map of a map difficult to read and I was unable to use nested chains (and the documentation).
Is it possible to do it with nested chains?
Some example string:
ecl:gry pid:860033327 eyr:2020 hcl:#fffffd byr:1937 iyr:2017 cid:147 hgt:183cm iyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884 hcl:#cfa07d byr:1929 hcl:#ae17e1 iyr:2013 eyr:2024 ecl:brn pid:760753108 byr:1931 hgt:179cm hcl:#cfa07d eyr:2025 pid:166559648 iyr:2011 ecl:brn hgt:59in
It's not really a bug so I would understand if you just close the issue.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am currently doing day 4 of adventofcode.com
Much of the job is just text parsing and I managed to do it with a nice "one-liner" thanks to this very neat package!
However, I found the maps and the map of a map difficult to read and I was unable to use nested chains (and the documentation).
Is it possible to do it with nested chains?
Some example string:
It's not really a bug so I would understand if you just close the issue.
The text was updated successfully, but these errors were encountered: