| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Dallycot::AST::ListCons; | 
| 2 |  |  |  |  |  |  | our $AUTHORITY = 'cpan:JSMITH'; | 
| 3 |  |  |  |  |  |  |  | 
| 4 |  |  |  |  |  |  | # ABSTRACT: Compose lambdas into a new lambda | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 23 |  |  | 23 |  | 12271 | use strict; | 
|  | 23 |  |  |  |  | 115 |  | 
|  | 23 |  |  |  |  | 698 |  | 
| 7 | 23 |  |  | 23 |  | 92 | use warnings; | 
|  | 23 |  |  |  |  | 31 |  | 
|  | 23 |  |  |  |  | 453 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 23 |  |  | 23 |  | 81 | use utf8; | 
|  | 23 |  |  |  |  | 35 |  | 
|  | 23 |  |  |  |  | 94 |  | 
| 10 | 23 |  |  | 23 |  | 409 | use parent 'Dallycot::AST'; | 
|  | 23 |  |  |  |  | 35 |  | 
|  | 23 |  |  |  |  | 97 |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 | 23 |  |  | 23 |  | 1122 | use Promises qw(deferred); | 
|  | 23 |  |  |  |  | 40 |  | 
|  | 23 |  |  |  |  | 102 |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | my $FunctionURI = Dallycot::Value::URI->new("http://www.dallycot.net/ns/core/1.0#list-cons"); | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | sub execute { | 
| 17 | 0 |  |  | 0 | 0 |  | my ( $self, $engine ) = @_; | 
| 18 |  |  |  |  |  |  |  | 
| 19 | 0 |  |  |  |  |  | my(@streams) = @$self; | 
| 20 |  |  |  |  |  |  |  | 
| 21 | 0 |  |  |  |  |  | my $value = pop @streams; | 
| 22 | 0 |  |  |  |  |  | while(@streams) { | 
| 23 | 0 |  |  |  |  |  | $value = Dallycot::AST::Apply->new( | 
| 24 |  |  |  |  |  |  | $FunctionURI, | 
| 25 |  |  |  |  |  |  | [ (pop @streams), $value ], | 
| 26 |  |  |  |  |  |  | {} | 
| 27 |  |  |  |  |  |  | ); | 
| 28 |  |  |  |  |  |  | } | 
| 29 | 0 |  |  |  |  |  | return $engine->execute($value); | 
| 30 |  |  |  |  |  |  | } | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | 1; |