cwchen icon

[Perl 6] Creating a set from a list.

cwchen | PRO | 11/09/17 02:22:43 AM UTC | 0 ⭐ | 8277 👁️ | Never ⏰ | []
Perl 6 |

0 B

|

None

|

0 👍

/

0 👎

my $set = (2, 1, 2, 4, 3, 4, 3, 3, 2, 1, 5, 1).Set;
 
$set.elems == 5 or die "Wrong element count";

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎