!RBIX 0 x M 1 n n x 10 __script__ i 42 5 7 0 64 47 49 1 1 15 5 7 2 64 47 49 1 1 15 5 7 3 64 47 49 1 1 15 5 45 4 5 43 6 56 7 47 50 8 1 15 2 11 I 3 I 0 I 0 I 0 n p 9 s 11 spec_helper x 7 require s 13 hamster/tuple s 12 hamster/list x 7 Hamster n x 4 List M 1 p 2 x 9 for_block t n x 9 __block__ i 11 5 7 0 64 56 1 47 50 2 1 11 I 4 I 0 I 0 I 0 I -2 p 3 s 10 #partition M 1 p 2 x 9 for_block t n x 9 __block__ i 131 5 7 0 64 56 1 47 50 2 1 15 35 0 35 0 35 0 35 3 79 35 1 79 35 1 35 0 35 3 79 80 35 2 79 35 1 80 35 1 35 3 79 80 4 3 35 3 79 4 3 35 2 80 35 1 35 3 79 80 4 3 4 4 35 4 79 4 3 35 2 80 4 4 35 2 35 3 80 4 3 4 4 35 3 4 3 35 1 80 4 4 35 2 35 3 4 3 4 4 35 2 4 3 35 1 4 4 35 1 35 3 4 4 35 1 35 0 4 4 35 1 35 3 35 8 56 3 50 4 0 11 I b I 0 I 0 I 0 I -2 p 5 s 7 is lazy M 1 p 2 x 9 for_block t n x 9 __block__ i 15 5 56 0 47 50 1 0 5 47 48 2 49 3 1 11 I 3 I 0 I 0 I 0 I -2 p 4 M 1 p 2 x 9 for_block t n x 9 __block__ i 11 45 0 1 56 2 50 3 0 48 4 11 I 3 I 0 I 0 I 0 I -2 p 5 x 7 Hamster n M 1 p 2 x 9 for_block t n x 9 __block__ i 5 5 47 48 0 11 I 2 I 0 I 0 I 0 I -2 p 1 x 4 fail p 3 I 0 I b I 5 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 6 stream x 9 partition p 3 I 0 I b I b x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 6 lambda x 11 raise_error x 10 should_not p 5 I 0 I a I 0 I b I f x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 2 it M 1 p 2 x 9 for_block t n x 9 __block__ i 34 58 36 37 19 0 15 37 19 1 15 37 19 2 15 15 5 7 0 20 0 48 1 47 48 2 63 2 56 3 47 50 4 1 11 I 7 I 3 I 3 I 3 n p 5 s 3 on x 7 inspect x 4 to_s M 1 p 2 x 9 for_block t n x 9 __block__ i 30 5 56 0 47 50 1 0 15 5 7 2 64 56 3 47 50 4 1 15 5 7 5 64 56 6 47 50 4 1 11 I 4 I 0 I 0 I 0 I -2 p 7 M 1 p 2 x 9 for_block t n x 9 __block__ i 14 45 0 1 21 2 0 36 1 51 2 0 38 3 11 I 4 I 0 I 0 I 0 I -2 p 4 x 7 Hamster n x 4 list x 9 @original p 5 I 0 I 1b I 0 I 1c I e x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 6 before s 12 with a block M 1 p 2 x 9 for_block t n x 9 __block__ i 52 5 56 0 47 50 1 0 15 5 7 2 64 56 3 47 50 4 1 15 5 7 5 64 56 6 47 50 4 1 15 5 7 7 64 56 8 47 50 4 1 15 5 7 9 64 56 10 47 50 4 1 11 I 4 I 0 I 0 I 0 I -2 p 11 M 1 p 2 x 9 for_block t n x 9 __block__ i 35 39 0 7 1 13 70 10 15 44 43 2 12 49 3 1 50 4 0 38 5 15 39 5 48 6 38 7 15 39 5 48 8 38 9 11 I 4 I 0 I 0 I 0 I -2 p 10 x 9 @original x 4 odd? x 4 Proc x 14 __from_block__ x 9 partition x 7 @result x 5 first x 8 @matches x 4 last x 10 @remainder p 9 I 0 I 21 I 0 I 22 I 15 I 23 I 1c I 24 I 23 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 6 before s 22 preserves the original M 1 p 2 x 9 for_block t n x 9 __block__ i 18 39 0 48 1 45 2 3 21 3 0 36 1 51 4 0 83 5 11 I 5 I 0 I 0 I 0 I -2 p 6 x 9 @original x 6 should x 7 Hamster n x 4 list x 2 == p 5 I 0 I 27 I 0 I 28 I 12 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 2 it s 30 returns a tuple with two items M 1 p 2 x 9 for_block t n x 9 __block__ i 16 39 0 45 1 2 43 3 49 4 1 48 5 2 83 6 11 I 3 I 0 I 0 I 0 I -2 p 7 x 7 @result x 7 Hamster n x 5 Tuple x 5 is_a? x 6 should x 2 == p 5 I 0 I 2b I 0 I 2c I 10 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 s 32 correctly identifies the matches M 1 p 2 x 9 for_block t n x 9 __block__ i 18 39 0 48 1 45 2 3 21 3 1 36 1 51 4 0 83 5 11 I 5 I 0 I 0 I 0 I -2 p 6 x 8 @matches x 6 should x 7 Hamster n x 4 list x 2 == p 5 I 0 I 2f I 0 I 30 I 12 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 s 34 correctly identifies the remainder M 1 p 2 x 9 for_block t n x 9 __block__ i 18 39 0 48 1 45 2 3 21 3 2 36 1 51 4 0 83 5 11 I 5 I 0 I 0 I 0 I -2 p 6 x 10 @remainder x 6 should x 7 Hamster n x 4 list x 2 == p 5 I 0 I 33 I 0 I 34 I 12 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 p 13 I 0 I 1f I 0 I 21 I 8 I 27 I 13 I 2b I 1e I 2f I 29 I 33 I 34 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 8 describe s 15 without a block M 1 p 2 x 9 for_block t n x 9 __block__ i 19 5 56 0 47 50 1 0 15 5 7 2 64 56 3 47 50 4 1 11 I 4 I 0 I 0 I 0 I -2 p 5 M 1 p 2 x 9 for_block t n x 9 __block__ i 7 39 0 48 1 38 2 11 I 2 I 0 I 0 I 0 I -2 p 3 x 9 @original x 9 partition x 7 @result p 5 I 0 I 3b I 0 I 3c I 7 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 6 before s 12 returns self M 1 p 2 x 9 for_block t n x 9 __block__ i 13 39 0 5 39 1 47 49 2 1 49 3 1 11 I 4 I 0 I 0 I 0 I -2 p 4 x 7 @result x 9 @original x 5 equal x 6 should p 5 I 0 I 3f I 0 I 40 I d x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 2 it p 7 I 0 I 39 I 0 I 3b I 8 I 3f I 13 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 p 9 I 0 I 19 I 0 I 1b I 8 I 1f I 13 I 39 I 1e x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 8 describe p 7 I 0 I f I 3 I 17 I f I 19 I 22 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 3 x 6 values x 16 expected_matches x 18 expected_remainder x 4 each p 23 I 0 I 8 I 0 I a I b I f I 13 I 10 I 1d I 11 I 29 I 12 I 39 I 13 I 4d I 14 I 5f I 15 I 6f I 16 I 7d I f I 83 x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 8 describe p 5 I 0 I 6 I 0 I 8 I b x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0 x 8 describe p 9 I 0 I 1 I 9 I 3 I 12 I 4 I 1b I 6 I 2a x 73 /Users/haruki_zaemon/Projects/hamster/spec/hamster/list/partition_spec.rb p 0