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.180 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.179 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.178 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.177 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.176 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.175 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.174 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.173 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.172 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.171 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.170 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.169 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.167 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.166 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.165 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.164 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.163 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.162 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.161 tracks/perl6/exercises/etl/.meta/exercise-data.yaml
trackler-2.2.1.160 tracks/perl6/exercises/etl/.meta/exercise-data.yaml