Quick actions

cmd+k|ctrl+k

Navigation

Languages

Code Golf: Determine the color of a chess square 

Snippet info

Language

Raku

Visibility

public

Author

markjreed

Created

2023-01-08T20:16:38.143774Z

Updated

2023-01-08T20:16:38.143774Z

# complete program to do only one square:
#say «dark light»[slurp.comb».ord.sum%2]

# the below version accepts multiple squares, one per line
say «dark light»[.comb».ord.sum%2] for lines;
INFO