From cfd4264b65cc7b38c99b0f28f692cd4e359b7722 Mon Sep 17 00:00:00 2001 From: Alexander Pankoff Date: Fri, 18 Feb 2022 14:04:18 +0100 Subject: Fix Typo in challenge 151 It's Separator not Seperator --- challenge-151/alexander-pankoff/perl/ch-1.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/challenge-151/alexander-pankoff/perl/ch-1.pl b/challenge-151/alexander-pankoff/perl/ch-1.pl index 7f6d3de5da..a0b3efc07e 100755 --- a/challenge-151/alexander-pankoff/perl/ch-1.pl +++ b/challenge-151/alexander-pankoff/perl/ch-1.pl @@ -61,7 +61,7 @@ sub minimum_binary_tree_depth ( @tokens) { my $num_elems = 2**$depth; for ( my $i = 0 ; $i < $num_elems ; $i++ ) { - if ( !@tokens || $tokens[0]->isa('SeperatorToken') ) { + if ( !@tokens || $tokens[0]->isa('SeparatorToken') ) { ## fill row with dummy placeholder tokens. unshift @tokens, map { PlaceHolderToken->new(-1) } @@ -94,8 +94,8 @@ sub minimum_binary_tree_depth ( @tokens) { $depth += 1; - # handle optional seperatortoken - if ( @tokens && $tokens[0]->isa("SeperatorToken") ) { + # handle optional separatortoken + if ( @tokens && $tokens[0]->isa("SeparatorToken") ) { shift @tokens; } } @@ -110,7 +110,7 @@ sub tokenize ( $input) { my $cur = substr( $input, $pos, 1 ); if ( $cur =~ m/\|/ ) { - push @tokens, SeperatorToken->new($pos); + push @tokens, SeparatorToken->new($pos); $pos += 1; } elsif ( $cur =~ m/\*/ ) { @@ -164,7 +164,7 @@ package PlaceHolderToken { } } -package SeperatorToken { +package SeparatorToken { use base 'TokenType'; sub new ( $class, $pos ) { -- cgit