Sha256: c79f02947c5bf5d5552a0aaa4d7473b5c0bfb6674068619fad5622f577b84b12

Contents?: true

Size: 504 Bytes

Versions: 82

Compression:

Stored size: 504 Bytes

Contents

exercise: Phone
version: 3
plan: 14
imports: '&clean-number'
tests: |
  for @($c-data<cases>[0]<cases>) {
    if .<expected> {
      is clean-number(.<phrase>), |.<expected description>;
    } else {
      nok clean-number(.<phrase>), .<description>;
    }
  }

unit: module
example: |
  sub clean-number ($number is copy) is export {
    $number ~~ s:g/<:!Nd>//;
    $number ~~ /^ 1? ( [ <[2..9]> <:Nd> ** 2 ] ** 2 <:Nd> ** 4 ) $/ ?? ~$0 !! Nil;
  }
stub: |
  sub clean-number ($number) is export {
  }

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
trackler-2.1.0.36 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.34 tracks/perl6/exercises/phone-number/example.yaml