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.0.0 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.55 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.54 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.53 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.52 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.51 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.50 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.49 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.48 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.47 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.46 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.45 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.44 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.43 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.42 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.41 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.40 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.39 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.38 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.1.0.37 tracks/perl6/exercises/phone-number/example.yaml