Perl 6 Parallelism in Perl 6 #17

Junctions

# Test if a value is in @list
if $value == any(@list) { ... }

# Test if a value is not in list
if $value == none(@list) { ... }

# Test if a value appears exactly once in a list
if $value == one(@list) { ... }

# Test if any values of @list1 are in @list2
if any(@list1) == any(@list2) { ... }

# Test if all values of @list1 are in @list2
if all(@list1) == any(@list2) { ... }

# Test if none of @list1 are in @list2
if all(@list1) == none(@list2) { ... }
Copyright © 2013
http://www.pmichaud.com/2013/pres/