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.53 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.52 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.51 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.50 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.49 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.48 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.47 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.46 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.45 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.44 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.43 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.42 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.41 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.40 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.39 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.38 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.37 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.36 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.35 tracks/perl6/exercises/phone-number/example.yaml
trackler-2.2.1.34 tracks/perl6/exercises/phone-number/example.yaml