-
-
Save zoffixznet/aaadf78817352bad377f824ae76e964c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2018.05.122 zoffix@VirtualBox~/R/rakudo (master)$ cat ../z.p6 | |
my (\t1, \t2) := $?FILE.IO.sibling('c.md').IO.slurp.split("\n\n").map: { | |
.trim.split(/\s*\,\s*/).Set | |
} | |
dd t1.Str.contains: 'Warring'; | |
dd t2.Str.contains: 'Warring'; | |
say "Got {+t1} elements in first set and {+t2} elements in second set"; | |
say t1 > t2 ?? "First set has these extra elements: {sort keys t2 ∖ t1}" | |
!! t1 < t2 ?? "Second set has these extra elements: {sort keys t1 ∖ t2}" | |
!! "Two sets are exact" | |
2018.05.122 zoffix@VirtualBox~/R/rakudo (master)$ ./perl6 ../z.p6 | |
Bool::True | |
Bool::False | |
Got 43 elements in first set and 44 elements in second set | |
Second set has these extra elements: David Warring | |
2018.05.122 zoffix@VirtualBox~/R/rakudo (master)$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment