úÎA>m     .Given a  for bs and a list of items [b], an  returns ( a re-ordered version of the item list. Given a  , an item b, a list of capacities [a], and a list of  bins [ b], a placment heuristic returns Just an updated lists of 6 capacities and bins if the item could be placed, and Nothing otherwise. A function that maps an item b to its size a. The constraint (  a,  a)@ has been omitted from the type, but is required by the exposed  functions. A  is a list of items. )What placement heuristic should be used?  Choose the 2nd to worst-fitting  bin. Place item in the bin with the " least (but sufficient) capacity. Place item in the bin with the  most capacity. Traverse bin list from  to   and place item in the first # bin that has sufficient capacity.  See above. Traverse bin list from  to   and place item in the first # bin that has sufficient capacity. How to pre-process the input. Sort from smallest to largest. Sort from largest to smallest. Don't modify item order. The list of all possible  # choices. Useful for benchmarking. The list of all possible PlacmentPolicy# choices. Useful for benchmarking. FAll supported ordering and placment choices. Useful for benchmarking. KReorder items prior to processing. Items are placed into bins in the order  from largest to smallest. KReorder items prior to processing. Items are placed into bins in the order  from smallest to largest. JBin packing without a limit on the number of bins (minimization problem). XAssumption: The maximum item size is at most the size of one bin (this is not checked).  Examples:  Pack the words of the senctene *"Bin packing heuristics are a lot of fun!" C into bins of size 11, assuming the size of a word is its length.  The  G ordering yields a sub-optimal result that leaves a lot of empty space  in the bins.  _ minimizeBins FirstFit Increasing length 11 (words "Bin packing heuristics are a lot of fun!") T ~~> ([1,4,4,2],[["heuristics"],["packing"],["fun!","lot"],["are","Bin","of","a"]])  Similarly, for . Note that we use  as the  for the size of an #. In this case, all bins are full. ; minimizeBins FirstFit Decreasing id 11 [3,7,10,3,1,3,2,4] ( ~~> ([0,0,0],[[2,3,3,3],[4,7],[1,10]]) )How to order the items before placement. "The bin packing heuristic to use. How to size the items. The size of one bin.  The items. $The result: a list of the remaining $ capacities and a list of the bins. Wrapper around (; useful if only the number of required bins is of interest. See % for a description of the arguments.  Examples: W How many bins of size 11 characters each do we need to pack the words of the sentence *"Bin packing heuristics are a lot of fun!"?  \ countBins FirstFit Increasing length 11 (words "Bin packing heuristics are a lot of fun!")  ~~> 4  Similarly, for . Note that we use  as the  for the size of an . 8 countBins FirstFit Decreasing id 11 [3,7,10,3,1,3,2,4]  ~~> 3 JBin pack with a given limit on the number (and sizes) of bins. Instead of Ncreating new bins, this version will return a list of items that could not be packed (if any). NExample: We have two bins, one of size 10 and one of size 12. Which words can we fit in there? a binpack WorstFit Decreasing length [10, 12] (words "Bin packing heuristics are a lot of fun!") N ~~> ([0,0],[["heuristics"],["a","fun!","packing"]],["of","lot","are","Bin"]) "The bin packing heuristic to use. )How to order the items before placement. How to size the items. Intitial per-bin capacities.  The items. *The result; a list of residue capacities, . the bins, and a list of items that could not  be placed. !"#$%&'(ISplit items into the A,B,C,D groups of the MFF algorithm. Only A, C, and  | the rest are returned. )*+,-./0123     4      !"#$%&'()*+,-./0123456789:;<= Binpack-0.3 Data.BinPackMeasureBinPlacementPolicyAlmostWorstFitWorstFitBestFitLastFitModifiedFirstFitFirstFit OrderPolicy Increasing DecreasingAsGiven allOrders allPlacements allHeuristics minimizeBins countBinsbinpackOrder PlacementbaseGHC.NumNum GHC.ClassesOrdGHC.Listlasthead placementorder decreasing increasingghc-prim GHC.TypesIntGHC.BaseidminimizexfitbestfitworstfitfirstfitlastfitalmostWorstfit minimizeMFF binpackMFFsplitMFFpackCsupdateinsertAtremoveAtremoveIfprop_lAprop_lC1prop_lC2 prop_rest prop_notLossy prop_remCap