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