line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Focus::Applicative::Identity; |
2
|
24
|
|
|
24
|
|
12449
|
use strict; |
|
24
|
|
|
|
|
28
|
|
|
24
|
|
|
|
|
728
|
|
3
|
24
|
|
|
24
|
|
91
|
use warnings; |
|
24
|
|
|
|
|
38
|
|
|
24
|
|
|
|
|
629
|
|
4
|
24
|
|
|
24
|
|
408
|
use parent qw(Data::Focus::Applicative); |
|
24
|
|
|
|
|
216
|
|
|
24
|
|
|
|
|
118
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
52376
|
|
|
52376
|
1
|
44388
|
my ($class, $datum) = @_; |
8
|
52376
|
|
|
|
|
137339
|
return bless \$datum, $class; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
*pure = *new; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub build { |
14
|
20033
|
|
|
20033
|
1
|
21234
|
my ($class, $builder, @f_parts) = @_; |
15
|
20033
|
|
|
|
|
18506
|
return $class->new($builder->(map { $_->run_identity } @f_parts)); |
|
31487
|
|
|
|
|
30432
|
|
16
|
|
|
|
|
|
|
## should we type-check @f_parts? |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub create_part_mapper { |
20
|
20876
|
|
|
20876
|
1
|
20982
|
my ($class, $updater) = @_; |
21
|
20876
|
|
|
31211
|
|
70957
|
return sub { $class->new($updater->(shift)) }; |
|
31211
|
|
|
|
|
41089
|
|
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub run_identity { |
25
|
52373
|
|
|
52373
|
1
|
31442
|
return ${$_[0]}; |
|
52373
|
|
|
|
|
89487
|
|
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
__END__ |