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.2.1.13 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.12 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.11 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.10 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.9 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.8 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.7 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.6 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.5 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.4 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.3 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.2 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.1 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.0 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.0.6 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.0.5 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.0.4 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.0.3 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.0.2 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.0.1 tracks/perl6/exercises/phone-number/example.yaml