package Ġcom . fort y se ven deg . hood Ċ Ċ import Ġarrow . core . Either Ċ import Ġarrow . core . Option Ċ import Ġarrow . data . Non Empty List Ċ import Ġcom . fort y se ven deg . hood . models .* Ċ Ċ private Ġfun ĠList < Benchmark >. filter Using Regex ( ĊĠ Ġmaybe Regex : ĠOption < Regex >, ĊĠ Ġr Filter : Ġ(( Benchmark ) Ġ-> Ġ( Boolean )) Ġ-> ĠList < Benchmark > Ċ ): ĠList < Benchmark > Ġ= ĊĠ Ġmaybe Regex . fold ({ Ġthis Ġ}) Ġ{ Ġregex Ġ-> Ġr Filter Ġ{ Ġbm : ĠBenchmark Ġ-> Ġregex . matches ( bm . getKey ()) Ġ} Ġ} Ċ Ċ fun ĠList < Benchmark >. filter Benchmark ( include Regex : ĠOption < Regex >): ĠList < Benchmark > Ġ= ĊĠ Ġfilter Using Regex ( include Regex ) Ġ{ Ġthis . filter ( it ) Ġ} Ċ Ċ fun ĠList < Benchmark >. filter Benchmark Not ( exclude Regex : ĠOption < Regex >): ĠList < Benchmark > Ġ= ĊĠ Ġfilter Using Regex ( exclude Regex ) Ġ{ Ġthis . filter Not ( it ) Ġ} Ċ Ċ fun ĠList < Benchmark >. filter Benchmark IE ( ĊĠ Ġinclude Regex : ĠOption < Regex >, ĊĠ Ġexclude Regex : ĠOption < Regex > Ċ ): ĠList < Benchmark > Ġ= Ġfilter Benchmark ( include Regex ). filter Benchmark Not ( exclude Regex ) Ċ Ċ fun ĠList < Benchmark Comparison >. get Wrong Results (): ĠList < Benchmark Comparison > Ġ= ĊĠ Ġthis . filter Ġ{ Ġit . result :: class Ġ== ĠBenchmark Result . FAILED :: class Ġ} Ċ Ċ fun ĠList < Benchmark Comparison >. handle Failures (): ĠEither < Benchmark Comparison Error , ĠList < Benchmark Comparison >> Ġ= ĊĠ ĠNon Empty List . fromList ( get Wrong Results ()). to Either Ġ{ Ġthis Ġ}. map Ġ{ ĊĠĠĠ ĠBenchmark Comparison Error ( Bad Performance Benchmark Error ( it . all )) ĊĠ Ġ}. swap () Ċ