From 1b002a641db1ceef820fe28b8a1df54983e815b7 Mon Sep 17 00:00:00 2001 From: Jörg Sommrey <28217714+jo-37@users.noreply.github.com> Date: Mon, 11 Oct 2021 18:16:35 +0200 Subject: Solution to task 2 --- challenge-134/jo-37/perl/ch-2.pl | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 challenge-134/jo-37/perl/ch-2.pl diff --git a/challenge-134/jo-37/perl/ch-2.pl b/challenge-134/jo-37/perl/ch-2.pl new file mode 100755 index 0000000000..d3ab47ea29 --- /dev/null +++ b/challenge-134/jo-37/perl/ch-2.pl @@ -0,0 +1,54 @@ +#!/usr/bin/perl -s + +use v5.16; +use PDL; +use Test2::V0 '!float'; +use experimental 'signatures'; + +our $examples; + +run_tests() if $examples; # does not return + +die <uniq->dim(0); +} + + +### Examples and tests + +sub run_tests { + + is num_dist_terms(3, 3), 6, 'example 1'; + is num_dist_terms(3, 5), 11, 'example 2'; + + done_testing; + exit; +} -- cgit