blib/lib/Dallycot/AST/ListCons.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.9% 32 / 33 CC 2 SCAR 2.5
CC
2
Cov
100%
execute
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/Dallycot/AST/Placeholder.pm ↑ Summary blib/lib/Dallycot/Value/Collection.pm »
1 package Dallycot::AST::ListCons;
2 29 our $AUTHORITY = 'cpan:JSMITH';
3  
4 # ABSTRACT: Compose lambdas into a new lambda
5  
6 29 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 29 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 29 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 29 ▶use parent 'Dallycot::AST';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 29 ▶use Promises qw(deferred);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 29 my $FunctionURI = Dallycot::Value::URI->new("http://www.dallycot.net/ns/core/1.0#list-cons");
15  
16 sub execute {
17 1 ▶ my ( $self, $engine ) = @_;
Subroutine execute: called CC=2 SCAR=6.9
Pod undocumented
18  
19 1 my(@streams) = @$self;
20  
21 1 my $value = pop @streams;
22 1 ▶ while(@streams) {
Branch: 1 branch
BranchTrueFalseTotal
if (@streams) 1 1 2
23 1 $value = Dallycot::AST::Apply->new(
24 $FunctionURI,
25 [ (pop @streams), $value ],
26 {}
27 );
28 }
29 1 return $engine->execute($value);
30 }
31  
32 29 1;
« blib/lib/Dallycot/AST/Placeholder.pm ↑ Summary blib/lib/Dallycot/Value/Collection.pm »