Sha256: bba939580b443792f93875d77c05924e82f40e96ad07f3f6da0891a149085cde

Contents?: true

Size: 859 Bytes

Versions: 83

Compression:

Stored size: 859 Bytes

Contents

exercise: ETL
version: 2
plan: 4
tests: |-
  =head2 Notes
  =begin para
  The test expects your returned C<Hash> to have
  L<type constraints|https://docs.perl6.org/type/Hash#Constraint_value_types>.
  Defined C<Str>s for the values, and defined C<Int>s for the keys.
  =end para
  for $c-data<cases>.values -> %case-set {
    is-deeply(
      transform(Hash[Array[Str:D], Int:D].new(
        .<input>.pairsĀ».&{
          .key.Int => Array[Str:D](.value.Slip)
        }
      )),
      Hash[Int:D, Str:D].new(.<expected>.pairs),
      .<description>
    ) for %case-set<cases>.values;
  }

unit: module
example: |-
  no precompilation;

  sub transform ( Hash[Array[Str:D], Int:D] $_ --> Hash[Int:D, Str:D] ) is export {
    Hash[Int:D, Str:D].new: .invertĀ».&{ .key.lc => .value }
  }
stub: |-
  no precompilation;

  sub transform (%input) is export {
  }

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.158 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.157 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.156 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.155 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.154 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.153 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.152 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.151 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.150 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.149 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.148 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.147 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.146 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.145 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.144 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.143 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.142 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.141 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.140 tracks/perl6/exercises/etl/.meta/exercise-data.yaml