Sex-Linked Inheritance

Author: L. Grondin

http://rosalind.info/problems/sexl/

Sample input

0.1 0.5 0.8

Sample output

0.18 0.5 0.32

Source code: sexl-grondilu.pl

use v6;

sub MAIN(Str $input = "0.1 0.5 0.8") {
    say "{map { 2*$^x*(1-$x) }, $input.split(' ')ยป.Num}";
}