Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gfldex/perl6-rakudo-slippy-semilists

implement postcircumfix:<|| > to allow coercion of Array to semilist
https://github.com/gfldex/perl6-rakudo-slippy-semilists

Last synced: 28 days ago
JSON representation

implement postcircumfix:<|| > to allow coercion of Array to semilist

Awesome Lists containing this project

README

        

# Rakudo::Slippy::Semilist
[![Build Status](https://travis-ci.org/gfldex/perl6-rakudo-slippy-semilists.svg?branch=master)](https://travis-ci.org/gfldex/perl6-rakudo-slippy-semilists)

Implements `postcircumfix:<{|| }>` to allow coercion of Array to semilist.
Implements `postcircumfix:<{; }>:exists` and `postcircumfix:<{|| }>`.
see: http://design.perl6.org/S09.html#line_419

# Usage:

```
use Rakudo::Slippy::Semilist;

my @a = 1,2,3;
my %h;
%h{||@a} = 42;
dd %h;
# OUTPUT«Hash %h = {"1" => ${"2" => ${"3" => 1}}}␤»
dd %h{1;2;3}:exists;
# OUTPUT«Bool::True␤»
```