package Ġcom . xr pn . immutable . f stack test Ċ Ċ import Ġcom . xr pn . im api . IM Collection Ċ import Ġcom . xr pn . im api . IM Stack Ċ import Ġcom . xr pn . immutable .* Ċ import Ġcom . xr pn . immutable . FK Set . Companion . empty IM K Set Ċ import Ġcom . xr pn . immutable . F Stack . Companion . empty IM Stack Ċ import Ġcom . xr pn . immutable . empty ArrayOf Int Ċ import Ġcom . xr pn . immutable . empty ArrayOf Str Ċ import Ġio . kot est . core . spec . style . Fun Spec Ċ import Ġio . kot est . matchers . shouldBe Ċ Ċ private Ġval Ġint Stack Of None : ĠIM Collection < Int > Ġ= ĠF Stack . of (* empty ArrayOf Int ) Ċ private Ġval Ġint Stack Of One : ĠIM Collection < Int > Ġ= ĠF Stack . of (* array Of < Int >( 1 )) Ċ private Ġval Ġint Stack Of One A : ĠIM Collection < Int > Ġ= ĠF Stack . of (* array Of < Int >( 3 )) Ċ private Ġval Ġint Stack Of Two : ĠIM Collection < Int > Ġ= ĠF Stack . of (* array Of < Int >( 1 , 2 )) Ċ private Ġval Ġint Stack Of Two A : ĠIM Collection < Int > Ġ= ĠF Stack . of (* array Of < Int >( 1 , 3 )) Ċ private Ġval Ġint Stack Of Three : ĠIM Collection < Int > Ġ= ĠF Stack . of (* array Of < Int >( 1 , 2 , 3 )) Ċ private Ġval Ġint Stack Of Four : ĠIM Collection < Int > Ġ= ĠF Stack . of (* array Of < Int >( 1 , 2 , 1 , 3 )) Ċ private Ġval Ġint Stack Of Four A : ĠIM Collection < Int > Ġ= ĠF Stack . of (* array Of < Int >( 1 , 2 , 2 , 3 )) Ċ private Ġval Ġint Stack Of Four B : ĠIM Collection < Int > Ġ= ĠF Stack . of (* array Of < Int >( 1 , 2 , 3 , 2 )) Ċ private Ġval Ġint Stack Of Six : ĠIM Collection < Int > Ġ= ĠF Stack . of (* array Of < Int >( 1 , 2 , 3 , 3 , 2 , 1 )) Ċ private Ġval Ġint Set : ĠIM Collection < Int > Ġ= ĠFK Set . ofs ( 1 , 2 ) ĊĊ Ċ private Ġval Ġstr Stack Of None : ĠIM Collection < String > Ġ= ĠF Stack . of (* empty ArrayOf Str ) Ċ private Ġval Ġstr Stack Of One : ĠIM Collection < String > Ġ= ĠF Stack . of (* array Of < String >(" 1 ")) Ċ private Ġval Ġstr Stack Of Two : ĠIM Collection < String > Ġ= ĠF Stack . of (* array Of < String >(" 1 "," 2 ")) Ċ private Ġval Ġstr Stack Of Three : ĠIM Collection < String > Ġ= ĠF Stack . of (* array Of < String >(" 1 "," 2 "," 3 ")) Ċ Ċ class ĠF Stack IM Collection Test Ġ: ĠFun Spec ({ ĊĊĠ Ġbefore Test Ġ{} ĊĊĠ Ġtest (" fall ") Ġ{ ĊĠĠĠ Ġint Stack Of None . fall Ġ{ Ġtrue Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of None . fall Ġ{ Ġfalse Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Three . fall Ġ{ Ġit Ġ> Ġ 0 Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Three . fall Ġ{ Ġit Ġ> Ġ 1 Ġ} ĠshouldBe Ġfalse ĊĠĠĠ Ġstr Stack Of Three . fall Ġ{ Ġit Ġ> Ġ" 0 " Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġstr Stack Of Three . fall Ġ{ Ġit Ġ> Ġ" 1 " Ġ} ĠshouldBe Ġfalse ĊĠ Ġ} ĊĊĠ Ġtest (" f any ") Ġ{ ĊĠĠĠ Ġint Stack Of None . f any Ġ{ Ġtrue Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of None . f any Ġ{ Ġfalse Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Three . f any Ġ{ Ġit Ġ> Ġ 3 Ġ} ĠshouldBe Ġfalse ĊĠĠĠ Ġint Stack Of Three . f any Ġ{ Ġit Ġ> Ġ 1 Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġstr Stack Of Three . f any Ġ{ Ġit Ġ> Ġ" 3 " Ġ} ĠshouldBe Ġfalse ĊĠĠĠ Ġstr Stack Of Three . f any Ġ{ Ġit Ġ> Ġ" 1 " Ġ} ĠshouldBe Ġtrue ĊĠ Ġ} ĊĊĠ Ġtest (" f contains ") Ġ{ ĊĠĠĠ Ġint Stack Of None . f contains ( 1 ) ĠshouldBe Ġfalse ĊĊĠĠĠ Ġint Stack Of One . f contains ( 0 ) ĠshouldBe Ġfalse ĊĠĠĠ Ġint Stack Of One . f contains ( 1 ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Two . f contains ( 0 ) ĠshouldBe Ġfalse ĊĠĠĠ Ġint Stack Of Two . f contains ( 1 ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Two . f contains ( 2 ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Three . f contains ( 0 ) ĠshouldBe Ġfalse ĊĠĠĠ Ġint Stack Of Three . f contains ( 1 ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Three . f contains ( 3 ) ĠshouldBe Ġtrue ĊĊĠĠĠ Ġstr Stack Of One . f contains (" 0 ") ĠshouldBe Ġfalse ĊĠĠĠ Ġstr Stack Of One . f contains (" 1 ") ĠshouldBe Ġtrue ĊĠĠĠ Ġstr Stack Of Two . f contains (" 0 ") ĠshouldBe Ġfalse ĊĠĠĠ Ġstr Stack Of Two . f contains (" 1 ") ĠshouldBe Ġtrue ĊĠĠĠ Ġstr Stack Of Two . f contains (" 2 ") ĠshouldBe Ġtrue ĊĠĠĠ Ġstr Stack Of Three . f contains (" 0 ") ĠshouldBe Ġfalse ĊĠĠĠ Ġstr Stack Of Three . f contains (" 1 ") ĠshouldBe Ġtrue ĊĠĠĠ Ġstr Stack Of Three . f contains (" 3 ") ĠshouldBe Ġtrue ĊĠ Ġ} ĊĊĠ Ġtest (" f count ") Ġ{ ĊĠĠĠ Ġint Stack Of None . f count Ġ{ Ġ_ Ġ-> Ġtrue Ġ} ĠshouldBe Ġ 0 ĊĠĠĠ Ġint Stack Of None . f count Ġ{ Ġ_ Ġ-> Ġfalse Ġ} ĠshouldBe Ġ 0 ĊĠĠĠ Ġint Stack Of One . f count Ġ{ Ġ_ Ġ-> Ġtrue Ġ} ĠshouldBe Ġ 1 ĊĠĠĠ Ġint Stack Of One . f count Ġ{ Ġ 0 Ġ< Ġit Ġ} ĠshouldBe Ġ 1 ĊĠĠĠ Ġint Stack Of One . f count Ġ{ Ġit Ġ< Ġ 0 Ġ} ĠshouldBe Ġ 0 ĊĠĠĠ Ġint Stack Of One . f count Ġ{ Ġ_ Ġ-> Ġfalse Ġ} ĠshouldBe Ġ 0 ĊĠĠĠ Ġint Stack Of Two . f count Ġ{ Ġ_ Ġ-> Ġtrue Ġ} ĠshouldBe Ġ 2 ĊĠĠĠ Ġint Stack Of Two . f count Ġ{ Ġ 0 Ġ< Ġit Ġ} ĠshouldBe Ġ 2 ĊĠĠĠ Ġint Stack Of Two . f count Ġ{ Ġ 1 Ġ< Ġit Ġ} ĠshouldBe Ġ 1 ĊĠĠĠ Ġint Stack Of Two . f count Ġ{ Ġit Ġ< Ġ 0 Ġ} ĠshouldBe Ġ 0 ĊĠĠĠ Ġint Stack Of Two . f count Ġ{ Ġ_ Ġ-> Ġfalse Ġ} ĠshouldBe Ġ 0 ĊĠ Ġ} ĊĊĠ Ġtest (" fd rop All ") Ġ{ ĊĠĠĠ Ġint Stack Of None . fd rop All ( int Stack Of None Ġas ĠIM Stack < Int >) ĠshouldBe Ġempty IM Stack < Int >() ĊĠĠĠ Ġint Stack Of One . fd rop All ( int Stack Of None ) ĠshouldBe Ġint Stack Of One ĊĠĠĠ Ġint Stack Of One . fd rop All ( int Stack Of One Ġas ĠIM Stack < Int >) ĠshouldBe Ġempty IM Stack < Int >() ĊĠĠĠ Ġint Stack Of One . fd rop All ( int Stack Of Two Ġas ĠIM Stack < Int >) ĠshouldBe Ġempty IM Stack < Int >() ĊĠĠĠ Ġ( int Stack Of One . fd rop All ( FL Nil ) Ġ=== Ġint Stack Of One ) ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 2 , 1 )). fd rop All ( int Stack Of Three Ġas ĠIM Stack < Int >) ĠshouldBe Ġempty IM Stack < Int >() ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 3 , 2 , 1 )). fd rop All ( int Stack Of Two ) ĠshouldBe Ġint Stack Of One A ĊĠĠĠ Ġint Stack Of Four . fd rop All ( int Set ) ĠshouldBe Ġint Stack Of One A ĊĠĠĠ Ġint Stack Of Four . fd rop All ( empty IM K Set ()) ĠshouldBe Ġint Stack Of Four ĊĠĠĠ Ġ( int Stack Of Four . fd rop All ( empty IM K Set ()) Ġ=== Ġint Stack Of Four ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Four A . fd rop All ( int Set ) ĠshouldBe Ġint Stack Of One A ĊĠĠĠ Ġint Stack Of Four B . fd rop All ( int Set ) ĠshouldBe Ġint Stack Of One A ĊĠĠĠ Ġint Stack Of Four . fd rop All ( int Stack Of Two ) ĠshouldBe Ġint Stack Of One A ĊĠĠĠ Ġint Stack Of Four A . fd rop All ( int Stack Of Two ) ĠshouldBe Ġint Stack Of One A ĊĠĠĠ Ġint Stack Of Four B . fd rop All ( int Stack Of Two ) ĠshouldBe Ġint Stack Of One A ĊĠ Ġ} ĊĊĠ Ġtest (" fd rop Item ") Ġ{ ĊĠĠĠ Ġ( int Stack Of None . fd rop Item ( 0 ) Ġ=== Ġint Stack Of None ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of One . fd rop Item ( 0 ) ĠshouldBe Ġint Stack Of One ĊĠĠĠ Ġint Stack Of One . fd rop Item ( 1 ) ĠshouldBe Ġempty IM Stack < Int >() ĊĠĠĠ Ġint Stack Of One . fd rop Item ( 2 ) ĠshouldBe Ġint Stack Of One ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 2 , 1 )). fd rop Item ( 2 ) ĠshouldBe Ġint Stack Of One ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 2 , 1 , 2 )). fd rop Item ( 2 ) ĠshouldBe Ġint Stack Of One ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 1 , Ġ 2 , Ġ 1 , Ġ 2 )). fd rop Item ( 2 ) ĠshouldBe ĠF Stack . of ( 1 , Ġ 1 ) ĊĠĠĠ Ġint Stack Of Six . fd rop Item ( 3 ) ĠshouldBe ĠF Stack . of (* array Of < Int >( 1 , Ġ 2 , Ġ 2 , Ġ 1 )) ĊĠĠĠ Ġint Stack Of Six . fd rop Item ( 2 ) ĠshouldBe ĠF Stack . of (* array Of < Int >( 1 , Ġ 3 , Ġ 3 , Ġ 1 )) ĊĠĠĠ Ġint Stack Of Six . fd rop Item ( 1 ) ĠshouldBe ĠF Stack . of (* array Of < Int >( 2 , Ġ 3 , Ġ 3 , Ġ 2 )) ĊĠ Ġ} ĊĊĠ Ġtest (" fd rop When ") Ġ{ ĊĠĠĠ Ġint Stack Of None . fd rop When Ġ{ Ġit Ġ> Ġ 1 Ġ} ĠshouldBe Ġempty IM Stack < Int >() ĊĠĠĠ Ġint Stack Of One . fd rop When Ġ{ Ġit Ġ> Ġ 1 Ġ} Ġ ĠshouldBe Ġint Stack Of One ĊĠĠĠ Ġ( int Stack Of One . fd rop When Ġ{ Ġit Ġ> Ġ 1 Ġ} Ġ=== Ġint Stack Of One ) ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 2 , 1 )). fd rop When Ġ{ Ġit Ġ> Ġ 1 Ġ} Ġ ĠshouldBe Ġint Stack Of One ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 3 , 2 , 1 )). fd rop When Ġ{ Ġit Ġ> Ġ 1 Ġ} Ġ ĠshouldBe Ġint Stack Of One ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 3 , 2 , 1 , 0 )). fd rop When Ġ{ Ġit Ġ> Ġ 1 Ġ} ĠshouldBe ĠF Stack . of ( 1 , Ġ 0 ) ĊĠĠĠ Ġint Stack Of Four . fd rop When Ġ{ Ġit Ġ> Ġ 1 Ġ} ĠshouldBe ĠF Stack . of ( 1 , Ġ 1 ) ĊĠĠĠ Ġ( int Stack Of Four . fd rop When Ġ{ Ġfalse Ġ} Ġ=== Ġint Stack Of Four ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Four A . fd rop When Ġ{ Ġit Ġ< Ġ 2 Ġ} ĠshouldBe ĠF Stack . of ( 2 , Ġ 2 , Ġ 3 ) ĊĠĠĠ Ġint Stack Of Four A . fd rop When Ġ{ Ġit Ġ< Ġ 3 Ġ} ĠshouldBe Ġint Stack Of One A ĊĠĠĠ Ġint Stack Of Four B . fd rop When Ġ{ Ġit Ġ< Ġ 3 Ġ} ĠshouldBe Ġint Stack Of One A ĊĠ Ġ} ĊĊĠ Ġtest (" f empty ") Ġ{ ĊĠĠĠ Ġempty IM Stack < Int >(). f empty () ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of (" a "). f empty () ĠshouldBe Ġfalse ĊĠĠĠĠĊĠĠĠ Ġint Stack Of None . f empty () ĠshouldBe Ġtrue ĊĠĠĠ Ġstr Stack Of None . f empty () ĠshouldBe Ġtrue ĊĠĠĠ Ġ( int Stack Of None Ġ=== Ġstr Stack Of None ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of One . f empty () ĠshouldBe Ġfalse ĊĠĠĠ Ġstr Stack Of Two . f empty () ĠshouldBe Ġfalse ĊĠ Ġ} ĊĊĠ Ġtest (" ff ilter ") Ġ{ ĊĠĠĠ Ġint Stack Of None . ff ilter Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe Ġempty IM Stack < Int >() ĊĠĠĠ Ġint Stack Of One . ff ilter Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe Ġempty IM Stack < Int >() ĊĠĠĠ Ġ( int Stack Of One . ff ilter Ġ{ true } Ġ=== Ġint Stack Of One ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Two . ff ilter Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe ĠF Stack . of ( 2 ) ĊĠĠĠ Ġ( int Stack Of Two . ff ilter Ġ{ true } Ġ=== Ġint Stack Of Two ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Three . ff ilter Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe ĠF Stack . of ( 2 ) ĊĠĠĠ Ġ( int Stack Of Three . ff ilter Ġ{ true } Ġ=== Ġint Stack Of Three ) ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 1 , 2 , 3 , 4 )). ff ilter Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe ĠF Stack . of ( 2 , 4 ) ĊĠ Ġ} ĊĊĠ Ġtest (" ff ilter Not ") Ġ{ ĊĠĠĠ Ġint Stack Of None . ff ilter Not Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe Ġempty IM Stack < Int >() ĊĠĠĠ Ġint Stack Of One . ff ilter Not Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe Ġint Stack Of One ĊĠĠĠ Ġ( int Stack Of One . ff ilter Not Ġ{ false } Ġ=== Ġint Stack Of One ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Two . ff ilter Not Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe Ġint Stack Of One ĊĠĠĠ Ġ( int Stack Of Two . ff ilter Not Ġ{ false } Ġ=== Ġint Stack Of Two ) ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Three . ff ilter Not Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe Ġint Stack Of Two A ĊĠĠĠ Ġ( int Stack Of Three . ff ilter Not Ġ{ false } Ġ=== Ġint Stack Of Three ) ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of (* array Of < Int >( 1 , 2 , 3 , 4 )). ff ilter Not Ġ{ 0 Ġ== Ġit Ġ% Ġ 2 } ĠshouldBe Ġint Stack Of Two A ĊĠ Ġ} ĊĊĠ Ġtest (" ff ind Any ") Ġ{ ĊĠĠĠ Ġint Stack Of None . ff ind Any Ġ{ Ġtrue Ġ} ĠshouldBe Ġnull ĊĠĠĠ Ġint Stack Of None . ff ind Any Ġ{ Ġfalse Ġ} ĠshouldBe Ġnull ĊĊĠĠĠ Ġint Stack Of One . ff ind Any Ġ{ Ġit Ġ== Ġ 0 Ġ} ĠshouldBe Ġnull ĊĠĠĠ Ġint Stack Of One . ff ind Any Ġ{ Ġit Ġ== Ġ 1 Ġ} ĠshouldBe Ġ 1 ĊĠĠĠ Ġint Stack Of Two . ff ind Any Ġ{ Ġit Ġ== Ġ 0 Ġ} ĠshouldBe Ġnull ĊĠĠĠ Ġint Stack Of Two . ff ind Any Ġ{ Ġit Ġ== Ġ 1 Ġ} ĠshouldBe Ġ 1 ĊĠĠĠ Ġint Stack Of Two . ff ind Any Ġ{ Ġit Ġ== Ġ 2 Ġ} ĠshouldBe Ġ 2 ĊĠĠĠ Ġint Stack Of Three . ff ind Any Ġ{ Ġit Ġ== Ġ 0 Ġ} ĠshouldBe Ġnull ĊĠĠĠ Ġint Stack Of Three . ff ind Any Ġ{ Ġit Ġ== Ġ 1 Ġ} ĠshouldBe Ġ 1 ĊĠĠĠ Ġint Stack Of Three . ff ind Any Ġ{ Ġit Ġ== Ġ 3 Ġ} ĠshouldBe Ġ 3 ĊĊĠĠĠ Ġstr Stack Of One . ff ind Any Ġ{ Ġit Ġ== Ġ" 0 " Ġ} ĠshouldBe Ġnull ĊĠĠĠ Ġstr Stack Of One . ff ind Any Ġ{ Ġit Ġ== Ġ" 1 " Ġ} ĠshouldBe Ġ" 1 " ĊĠĠĠ Ġstr Stack Of Two . ff ind Any Ġ{ Ġit Ġ== Ġ" 0 " Ġ} ĠshouldBe Ġnull ĊĠĠĠ Ġstr Stack Of Two . ff ind Any Ġ{ Ġit Ġ== Ġ" 1 " Ġ} ĠshouldBe Ġ" 1 " ĊĠĠĠ Ġstr Stack Of Two . ff ind Any Ġ{ Ġit Ġ== Ġ" 2 " Ġ} ĠshouldBe Ġ" 2 " ĊĠĠĠ Ġstr Stack Of Three . ff ind Any Ġ{ Ġit Ġ== Ġ" 0 " Ġ} ĠshouldBe Ġnull ĊĠĠĠ Ġstr Stack Of Three . ff ind Any Ġ{ Ġit Ġ== Ġ" 1 " Ġ} ĠshouldBe Ġ" 1 " ĊĠĠĠ Ġstr Stack Of Three . ff ind Any Ġ{ Ġit Ġ== Ġ" 3 " Ġ} ĠshouldBe Ġ" 3 " ĊĠ Ġ} ĊĊĠ Ġtest (" fis Strict ") Ġ{ ĊĠĠĠ Ġint Stack Of None . fis Strict () ĠshouldBe Ġtrue ĊĠĠĠ Ġstr Stack Of Three . fis Strict () ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of Three . fis Strict () ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of ( FK Set . of i (" A "), ĠFK Set . ofs (" A ")). fis Strict () ĠshouldBe Ġfalse ĊĠĠĠ ĠF Stack . of ( set Of ( FK Set . of i (" A "), ĠFK Set . ofs (" A ")) ). fis Strict () ĠshouldBe Ġfalse ĊĠĠĠ ĠF Stack . of ( set Of ( FK Set . of i (" A "), ĠFK Set . of i (" A "), Ġset Of ( FK Set . of i (" A "), ĠFK Set . ofs (" A ")) )). fis Strict () ĠshouldBe Ġfalse ĊĠĠĠ ĠF Stack . of ( FK Set . of i ( FK Set . of i (" A "), ĠFK Set . of i (" A "), Ġset Of ( FK Set . of i (" A "), ĠFK Set . ofs (" A ")) )). fis Strict () ĠshouldBe Ġfalse ĊĠĠĠ ĠF Stack . of ( mutable Map Of ((" 1 " Ġto Ġ 1 ), Ġ(" 2 " Ġto Ġ 2 )), Ġmutable Map Of (( 1 Ġto Ġ 1 ), Ġ( 2 Ġto Ġ 2 ))). fis Strict () ĠshouldBe Ġfalse ĊĠĠĠ ĠF Stack . of ( mutable Map Of (( 1 Ġto Ġ" 1 "), Ġ( 2 Ġto Ġ" 2 ")), Ġmutable Map Of (( 1 Ġto Ġ 1 ), Ġ( 2 Ġto Ġ 2 ))). fis Strict () ĠshouldBe Ġfalse ĊĠĠĠ ĠF Stack . of ( mutable Map Of (( 1 Ġto Ġ 1 ), Ġ( 2 Ġto Ġ 2 )), Ġmutable Map Of (( 1 Ġto Ġ 1 ), Ġ( 2 Ġto Ġ 2 ))). fis Strict () ĠshouldBe Ġtrue ĊĠ Ġ} ĊĊĠ Ġtest (" fn one ") Ġ{ ĊĠĠĠ Ġint Stack Of None . fn one Ġ{ Ġtrue Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of None . fn one Ġ{ Ġfalse Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of One . fn one Ġ{ Ġfalse Ġ} ĠshouldBe Ġtrue ĊĠĠĠ Ġint Stack Of One . fn one Ġ{ Ġtrue Ġ} ĠshouldBe Ġfalse ĊĠĠĠ Ġint Stack Of Two . fn one Ġ{ Ġit Ġ== Ġ 1 Ġ} ĠshouldBe Ġfalse ĊĠĠĠ Ġint Stack Of Two . fn one Ġ{ Ġit Ġ> Ġ 1 0 Ġ} ĠshouldBe Ġtrue ĊĠ Ġ} ĊĊĠ Ġtest (" fp ick ") Ġ{ ĊĠĠĠ Ġint Stack Of None . fp ick () ĠshouldBe Ġnull ĊĠĠĠ Ġint Stack Of One . fp ick ()?. let Ġ{ Ġit :: class Ġ} ĠshouldBe ĠInt :: class ĊĠĠĠ Ġstr Stack Of One . fp ick ()?. let Ġ{ Ġit :: class Ġ} ĠshouldBe ĠString :: class ĊĠ Ġ} ĊĊĠ Ġtest (" fp ick NotEmpty ") Ġ{ ĊĠĠĠ Ġint Stack Of None . fp ick NotEmpty () ĠshouldBe Ġnull ĊĠĠĠ Ġint Stack Of One . fp ick NotEmpty ()?. let Ġ{ Ġit :: class Ġ} ĠshouldBe ĠInt :: class ĊĠĠĠ Ġstr Stack Of One . fp ick NotEmpty ()?. let Ġ{ Ġit :: class Ġ} ĠshouldBe ĠString :: class ĊĠĠĠ ĠF Stack . of ( FK Set . of i (" A "), ĠFK Set . ofs (" A ")). fp ick NotEmpty ()?. equals ( FK Set . of i (" A ")) ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of ( empty Set < Int >(), Ġempty Set < Int > ()). fp ick NotEmpty () ĠshouldBe Ġnull ĊĠĠĠ ĠF Stack . of ( empty Set < Int >(), Ġempty Set < Int >(), ĠFK Set . of i (" A ")). fp ick NotEmpty ()?. equals ( FK Set . of i (" A ")) ĠshouldBe Ġtrue ĊĠ Ġ} ĊĊĠ Ġtest Ġ(" f pop And Reminder ") Ġ{ ĊĠĠĠ Ġval Ġ( pop 1 , Ġreminder 1 ) Ġ= Ġint Stack Of None . f pop And Remain der () ĊĠĠĠ Ġpop 1 ĠshouldBe Ġnull ĊĠĠĠ Ġreminder 1 . f empty () ĠshouldBe Ġtrue ĊĠĠĠ Ġval Ġ( pop 2 , Ġreminder 2 ) Ġ= Ġint Stack Of One . f pop And Remain der () ĊĠĠĠ Ġpop 2 ĠshouldBe Ġint Stack Of One . fp ick () ĊĠĠĠ Ġreminder 2 . f empty () ĠshouldBe Ġtrue ĊĠĠĠ Ġval Ġ( pop 3 , Ġreminder 3 ) Ġ= Ġint Stack Of Two . f pop And Remain der () ĊĠĠĠ Ġpop 3 ĠshouldBe Ġint Stack Of One . fp ick () ĊĠĠĠ Ġreminder 3 . equals ( F Stack . of ( 2 )) ĠshouldBe Ġtrue ĊĠĠĠ Ġval Ġ( pop 4 , Ġreminder 4 ) Ġ= Ġint Stack Of Three . f pop And Remain der () ĊĠĠĠ Ġpop 4 ĠshouldBe Ġint Stack Of One . fp ick () ĊĠĠĠ Ġreminder 4 . equals ( F Stack . of ( 2 , Ġ 3 )) ĠshouldBe Ġtrue ĊĠ Ġ} ĊĊĠ Ġtest (" f size ") Ġ{ ĊĠĠĠ Ġint Stack Of None . f size () ĠshouldBe Ġ 0 ĊĠĠĠ Ġint Stack Of One . f size () ĠshouldBe Ġ 1 ĊĠĠĠ Ġint Stack Of Two . f size () ĠshouldBe Ġ 2 ĊĠĠĠ Ġint Stack Of Three . f size () ĠshouldBe Ġ 3 ĊĠ Ġ} ĊĊĠ Ġtest (" fis Nested ") Ġ{ ĊĠĠĠ Ġint Stack Of None . fis Nested () ĠshouldBe Ġnull ĊĠĠĠ Ġint Stack Of One . fis Nested () ĠshouldBe Ġfalse ĊĠĠĠ Ġint Stack Of Two . fis Nested () ĠshouldBe Ġfalse ĊĠĠĠ ĠF Stack . of ( int Stack Of None ). fis Nested () ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of ( empty Array < Int > ()). fis Nested () ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of ( set Of < Int > ()). fis Nested () ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of (* array Of ( listOf < Int >() )). fis Nested () ĠshouldBe Ġtrue ĊĠĠĠ ĠF Stack . of ( map Of < Int , ĠInt > ()). fis Nested () ĠshouldBe Ġtrue ĊĠ Ġ} Ċ }) Ċ