Re: Coercion/type checking: manually reproduce Perl6 standards

2018-09-01 Thread Fernando Santagata
Hello, I'm really glad to read of your experience, because I was wrestling just yesterday with a problem that feels similar. I wanted to write a simple sub which could accept both an Array and a List, and that was simple: use NativeCall; sub s(Positional $a) { CArray[num64].new: $a.map(|*)ยป.re

Coercion/type checking: manually reproduce Perl6 standards

2018-09-01 Thread Vadim Belman
Hi everybody, I'm just transferring here a StackOverflow topic https://stackoverflow.com/questions/52117678/coercion-type-checking-manually-reproduce-perl6-standards because what was a question over there turned immediately into a discussion which doesn't fit into SO format. Not sure if I gonna