package com.booknara.problem.graph

/**
 * 399. Evaluate Division (Medium)
 * https://leetcode.com/problems/evaluate-division/
 */
class EvaluateDivisionKt {
  // T:O(v+e), S:O(v+e)
  fun calcEquation(equations: List<List<String>>, values: DoubleArray, queries: List<List<String>>): DoubleArray {
    // build a graph for the equations
    val res = DoubleArray(queries.size)

    val graph = HashMap<String, ArrayList<Pair<String, Double>>>()
    for (i in equations.indices) {
      val first = equations[i][0]
      val second = equations[i][1]
      val value = values[i]
      graph.putIfAbsent(first, ArrayList())
      graph.putIfAbsent(second, ArrayList())
      graph[first]?.add(Pair(second, value))
      graph[second]?.add(Pair(first, 1.0 / value))
    }

    for (i in 0..queries.size - 1) {
      val start = queries[i][0]
      val end = queries[i][1]
      res[i] = dfs(start, end, graph, HashSet())
    }

    return res
  }

  fun dfs(start: String, end: String, graph: HashMap<String, ArrayList<Pair<String, Double>>>, visited: HashSet<String>): Double {
    if (!graph.containsKey(start) && !graph.containsKey(end)) {
      return -1.0
    }

    if (start == end) {
      return 1.0
    }

    visited.add(start)
    if (graph.containsKey(start)) {
      val list = graph.getValue(start)
      for (i in 0..list.size - 1) {
        val pair = list.get(i)
        if (!visited.contains(pair.first)) {
          val res = dfs(pair.first, end, graph, visited)
          if (res != -1.0) {
            return res * pair.second;
          }
        }
      }
    }

    return -1.0
  }
}

fun main(args: Array<String>) {
  val equations = listOf(listOf("a", "b"), listOf("b", "c"))
  val values = doubleArrayOf(2.0,3.0)
  val queries = listOf(listOf("a", "c"), listOf("b", "a"), listOf("a", "e"), listOf("a", "a"), listOf("x", "x"))
  val result = EvaluateDivisionKt().calcEquation(equations, values, queries)
  for (r in result) {
    println(r)
  }
}

Compiled from "EvaluateDivisionKt.kt"
public final class com.booknara.problem.graph.EvaluateDivisionKtKt {
  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #9                  // String args
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_2
       7: anewarray     #17                 // class java/util/List
      10: astore_2
      11: aload_2
      12: iconst_0
      13: iconst_2
      14: anewarray     #19                 // class java/lang/String
      17: astore_3
      18: aload_3
      19: iconst_0
      20: ldc           #21                 // String a
      22: aastore
      23: aload_3
      24: iconst_1
      25: ldc           #23                 // String b
      27: aastore
      28: aload_3
      29: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      32: aastore
      33: aload_2
      34: iconst_1
      35: iconst_2
      36: anewarray     #19                 // class java/lang/String
      39: astore_3
      40: aload_3
      41: iconst_0
      42: ldc           #23                 // String b
      44: aastore
      45: aload_3
      46: iconst_1
      47: ldc           #31                 // String c
      49: aastore
      50: aload_3
      51: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      54: aastore
      55: aload_2
      56: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      59: astore_1
      60: iconst_2
      61: newarray       double
      63: astore_3
      64: aload_3
      65: iconst_0
      66: ldc2_w        #32                 // double 2.0d
      69: dastore
      70: aload_3
      71: iconst_1
      72: ldc2_w        #34                 // double 3.0d
      75: dastore
      76: aload_3
      77: astore_2
      78: iconst_5
      79: anewarray     #17                 // class java/util/List
      82: astore        4
      84: aload         4
      86: iconst_0
      87: iconst_2
      88: anewarray     #19                 // class java/lang/String
      91: astore        5
      93: aload         5
      95: iconst_0
      96: ldc           #21                 // String a
      98: aastore
      99: aload         5
     101: iconst_1
     102: ldc           #31                 // String c
     104: aastore
     105: aload         5
     107: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     110: aastore
     111: aload         4
     113: iconst_1
     114: iconst_2
     115: anewarray     #19                 // class java/lang/String
     118: astore        5
     120: aload         5
     122: iconst_0
     123: ldc           #23                 // String b
     125: aastore
     126: aload         5
     128: iconst_1
     129: ldc           #21                 // String a
     131: aastore
     132: aload         5
     134: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     137: aastore
     138: aload         4
     140: iconst_2
     141: iconst_2
     142: anewarray     #19                 // class java/lang/String
     145: astore        5
     147: aload         5
     149: iconst_0
     150: ldc           #21                 // String a
     152: aastore
     153: aload         5
     155: iconst_1
     156: ldc           #37                 // String e
     158: aastore
     159: aload         5
     161: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     164: aastore
     165: aload         4
     167: iconst_3
     168: iconst_2
     169: anewarray     #19                 // class java/lang/String
     172: astore        5
     174: aload         5
     176: iconst_0
     177: ldc           #21                 // String a
     179: aastore
     180: aload         5
     182: iconst_1
     183: ldc           #21                 // String a
     185: aastore
     186: aload         5
     188: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     191: aastore
     192: aload         4
     194: iconst_4
     195: iconst_2
     196: anewarray     #19                 // class java/lang/String
     199: astore        5
     201: aload         5
     203: iconst_0
     204: ldc           #39                 // String x
     206: aastore
     207: aload         5
     209: iconst_1
     210: ldc           #39                 // String x
     212: aastore
     213: aload         5
     215: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     218: aastore
     219: aload         4
     221: invokestatic  #29                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     224: astore_3
     225: new           #41                 // class com/booknara/problem/graph/EvaluateDivisionKt
     228: dup
     229: invokespecial #45                 // Method com/booknara/problem/graph/EvaluateDivisionKt."<init>":()V
     232: aload_1
     233: aload_2
     234: aload_3
     235: invokevirtual #49                 // Method com/booknara/problem/graph/EvaluateDivisionKt.calcEquation:(Ljava/util/List;[DLjava/util/List;)[D
     238: astore        4
     240: iconst_0
     241: istore        5
     243: aload         4
     245: arraylength
     246: istore        6
     248: iload         5
     250: iload         6
     252: if_icmpge     276
     255: aload         4
     257: iload         5
     259: daload
     260: dstore        7
     262: getstatic     #55                 // Field java/lang/System.out:Ljava/io/PrintStream;
     265: dload         7
     267: invokevirtual #61                 // Method java/io/PrintStream.println:(D)V
     270: iinc          5, 1
     273: goto          248
     276: return
}


package com.booknara.problem.math

/**
 * 593. Valid Square (Medium)
 * https://leetcode.com/problems/valid-square/
 */
class ValidSquare {
    // T:O(1), S:O(1)
    fun validSquare(p1: IntArray, p2: IntArray, p3: IntArray, p4: IntArray): Boolean {
        // input check, there are four points
        val points = arrayOf(p1, p2, p3, p4)
        points.sortWith(compareBy<IntArray> { it[0] }.thenBy { it[1] })

        return (getDistance(points[0], points[1]) != 0) and
                (getDistance(points[0], points[1]) == getDistance(points[1], points[3])) and
                (getDistance(points[1], points[3]) == getDistance(points[3], points[2])) and
                (getDistance(points[3], points[2]) == getDistance(points[2], points[0])) and
                (getDistance(points[0], points[3]) == getDistance(points[1], points[2]))
    }

    private fun getDistance(p1: IntArray, p2: IntArray) = (p1[0] - p2[0]) * (p1[0] - p2[0]) + (p1[1] - p2[1]) * (p1[1] - p2[1])
}

fun main() {
    val valid = ValidSquare().validSquare(
            intArrayOf(0, 0),
            intArrayOf(5, 0),
            intArrayOf(5, 4),
            intArrayOf(0, 4)
    )
    println(valid)
}
/*
(0,4)   (5,4)

(0,0)   (5,0)
[1134,-2539]
[492,-1255]
[-792,-1897]
[-150,-3181]
 */

Compiled from "ValidSquare.kt"
public final class com.booknara.problem.math.ValidSquareKt {
  public static final void main();
    Code:
       0: new           #8                  // class com/booknara/problem/math/ValidSquare
       3: dup
       4: invokespecial #11                 // Method com/booknara/problem/math/ValidSquare."<init>":()V
       7: iconst_2
       8: newarray       int
      10: astore_1
      11: aload_1
      12: iconst_0
      13: iconst_0
      14: iastore
      15: aload_1
      16: iconst_1
      17: iconst_0
      18: iastore
      19: aload_1
      20: iconst_2
      21: newarray       int
      23: astore_1
      24: aload_1
      25: iconst_0
      26: iconst_5
      27: iastore
      28: aload_1
      29: iconst_1
      30: iconst_0
      31: iastore
      32: aload_1
      33: iconst_2
      34: newarray       int
      36: astore_1
      37: aload_1
      38: iconst_0
      39: iconst_5
      40: iastore
      41: aload_1
      42: iconst_1
      43: iconst_4
      44: iastore
      45: aload_1
      46: iconst_2
      47: newarray       int
      49: astore_1
      50: aload_1
      51: iconst_0
      52: iconst_0
      53: iastore
      54: aload_1
      55: iconst_1
      56: iconst_4
      57: iastore
      58: aload_1
      59: invokevirtual #15                 // Method com/booknara/problem/math/ValidSquare.validSquare:([I[I[I[I)Z
      62: istore_0
      63: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
      66: iload_0
      67: invokevirtual #27                 // Method java/io/PrintStream.println:(Z)V
      70: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #32                 // Method main:()V
       3: return
}

Compiled from "Comparisons.kt"
public final class com.booknara.problem.math.ValidSquare$validSquare$$inlined$thenBy$1<T> implements java.util.Comparator {
  final java.util.Comparator $this_thenBy;

  public com.booknara.problem.math.ValidSquare$validSquare$$inlined$thenBy$1(java.util.Comparator);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #18                 // Field $this_thenBy:Ljava/util/Comparator;
       5: aload_0
       6: invokespecial #21                 // Method java/lang/Object."<init>":()V
       9: return

  public final int compare(T, T);
    Code:
       0: aload_0
       1: getfield      #18                 // Field $this_thenBy:Ljava/util/Comparator;
       4: aload_1
       5: aload_2
       6: invokeinterface #29,  3           // InterfaceMethod java/util/Comparator.compare:(Ljava/lang/Object;Ljava/lang/Object;)I
      11: istore_3
      12: iload_3
      13: ifeq          20
      16: iload_3
      17: goto          66
      20: aload_1
      21: checkcast     #31                 // class "[I"
      24: astore        4
      26: iconst_0
      27: istore        5
      29: aload         4
      31: iconst_1
      32: iaload
      33: invokestatic  #37                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      36: checkcast     #39                 // class java/lang/Comparable
      39: aload_2
      40: checkcast     #31                 // class "[I"
      43: astore        4
      45: astore        6
      47: iconst_0
      48: istore        5
      50: aload         4
      52: iconst_1
      53: iaload
      54: invokestatic  #37                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      57: checkcast     #39                 // class java/lang/Comparable
      60: aload         6
      62: swap
      63: invokestatic  #45                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      66: ireturn
}

Compiled from "ValidSquare.kt"
public final class com.booknara.problem.math.ValidSquare {
  public com.booknara.problem.math.ValidSquare();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return

  public final boolean validSquare(int[], int[], int[], int[]);
    Code:
       0: aload_1
       1: ldc           #15                 // String p1
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_2
       7: ldc           #23                 // String p2
       9: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_3
      13: ldc           #25                 // String p3
      15: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      18: aload         4
      20: ldc           #27                 // String p4
      22: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      25: iconst_4
      26: anewarray     #29                 // class "[I"
      29: astore        6
      31: aload         6
      33: iconst_0
      34: aload_1
      35: aastore
      36: aload         6
      38: iconst_1
      39: aload_2
      40: aastore
      41: aload         6
      43: iconst_2
      44: aload_3
      45: aastore
      46: aload         6
      48: iconst_3
      49: aload         4
      51: aastore
      52: aload         6
      54: astore        5
      56: aload         5
      58: checkcast     #31                 // class "[Ljava/lang/Object;"
      61: new           #33                 // class com/booknara/problem/math/ValidSquare$validSquare$$inlined$compareBy$1
      64: dup
      65: invokespecial #34                 // Method com/booknara/problem/math/ValidSquare$validSquare$$inlined$compareBy$1."<init>":()V
      68: checkcast     #36                 // class java/util/Comparator
      71: astore        6
      73: new           #38                 // class com/booknara/problem/math/ValidSquare$validSquare$$inlined$thenBy$1
      76: dup
      77: aload         6
      79: invokespecial #41                 // Method com/booknara/problem/math/ValidSquare$validSquare$$inlined$thenBy$1."<init>":(Ljava/util/Comparator;)V
      82: checkcast     #36                 // class java/util/Comparator
      85: invokestatic  #47                 // Method kotlin/collections/ArraysKt.sortWith:([Ljava/lang/Object;Ljava/util/Comparator;)V
      88: aload_0
      89: aload         5
      91: iconst_0
      92: aaload
      93: aload         5
      95: iconst_1
      96: aaload
      97: invokespecial #51                 // Method getDistance:([I[I)I
     100: ifeq          107
     103: iconst_1
     104: goto          108
     107: iconst_0
     108: aload_0
     109: aload         5
     111: iconst_0
     112: aaload
     113: aload         5
     115: iconst_1
     116: aaload
     117: invokespecial #51                 // Method getDistance:([I[I)I
     120: aload_0
     121: aload         5
     123: iconst_1
     124: aaload
     125: aload         5
     127: iconst_3
     128: aaload
     129: invokespecial #51                 // Method getDistance:([I[I)I
     132: if_icmpne     139
     135: iconst_1
     136: goto          140
     139: iconst_0
     140: iand
     141: aload_0
     142: aload         5
     144: iconst_1
     145: aaload
     146: aload         5
     148: iconst_3
     149: aaload
     150: invokespecial #51                 // Method getDistance:([I[I)I
     153: aload_0
     154: aload         5
     156: iconst_3
     157: aaload
     158: aload         5
     160: iconst_2
     161: aaload
     162: invokespecial #51                 // Method getDistance:([I[I)I
     165: if_icmpne     172
     168: iconst_1
     169: goto          173
     172: iconst_0
     173: iand
     174: aload_0
     175: aload         5
     177: iconst_3
     178: aaload
     179: aload         5
     181: iconst_2
     182: aaload
     183: invokespecial #51                 // Method getDistance:([I[I)I
     186: aload_0
     187: aload         5
     189: iconst_2
     190: aaload
     191: aload         5
     193: iconst_0
     194: aaload
     195: invokespecial #51                 // Method getDistance:([I[I)I
     198: if_icmpne     205
     201: iconst_1
     202: goto          206
     205: iconst_0
     206: iand
     207: aload_0
     208: aload         5
     210: iconst_0
     211: aaload
     212: aload         5
     214: iconst_3
     215: aaload
     216: invokespecial #51                 // Method getDistance:([I[I)I
     219: aload_0
     220: aload         5
     222: iconst_1
     223: aaload
     224: aload         5
     226: iconst_2
     227: aaload
     228: invokespecial #51                 // Method getDistance:([I[I)I
     231: if_icmpne     238
     234: iconst_1
     235: goto          239
     238: iconst_0
     239: iand
     240: ireturn

  private final int getDistance(int[], int[]);
    Code:
       0: aload_1
       1: iconst_0
       2: iaload
       3: aload_2
       4: iconst_0
       5: iaload
       6: isub
       7: aload_1
       8: iconst_0
       9: iaload
      10: aload_2
      11: iconst_0
      12: iaload
      13: isub
      14: imul
      15: aload_1
      16: iconst_1
      17: iaload
      18: aload_2
      19: iconst_1
      20: iaload
      21: isub
      22: aload_1
      23: iconst_1
      24: iaload
      25: aload_2
      26: iconst_1
      27: iaload
      28: isub
      29: imul
      30: iadd
      31: ireturn
}

Compiled from "Comparisons.kt"
public final class com.booknara.problem.math.ValidSquare$validSquare$$inlined$compareBy$1<T> implements java.util.Comparator {
  public com.booknara.problem.math.ValidSquare$validSquare$$inlined$compareBy$1();
    Code:
       0: aload_0
       1: invokespecial #16                 // Method java/lang/Object."<init>":()V
       4: return

  public final int compare(T, T);
    Code:
       0: aload_1
       1: checkcast     #23                 // class "[I"
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: iconst_0
      10: iaload
      11: invokestatic  #29                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      14: checkcast     #31                 // class java/lang/Comparable
      17: aload_2
      18: checkcast     #23                 // class "[I"
      21: astore_3
      22: astore        5
      24: iconst_0
      25: istore        4
      27: aload_3
      28: iconst_0
      29: iaload
      30: invokestatic  #29                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      33: checkcast     #31                 // class java/lang/Comparable
      36: aload         5
      38: swap
      39: invokestatic  #37                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      42: ireturn
}


package com.booknara.practice.kotlin.higherorderfunction

data class Grocery(
        val name: String,
        val category: String,
        val unit: String,
        val unitPrice: Double,
        val quantity: Int)

fun main(args: Array<String>) {
    val groceries = listOf<Grocery>(
            Grocery("Tomatoes", "Vegetable", "lb", 3.0, 3),
            Grocery("Mushroom", "Vegetable", "lb", 4.0, 1),
            Grocery("Bagels", "Bakery", "Pack", 1.5, 2),
            Grocery("Olive oil", "Pantry", "Bottle", 6.0, 1),
            Grocery("Ice cream", "Frozen", "Pack", 3.0, 2)
    )

    val highestUnitPrice = groceries.maxBy { it.unitPrice * 5 }
    println("highestUnitPrice: $highestUnitPrice")
    val lowestQuantity = groceries.minBy { it.quantity }
    println("lowestQuantity: $lowestQuantity")

    val sumQuantity = groceries.sumBy { it.quantity }
    println("sumQuantity: $sumQuantity")
    val totalPrice = groceries.sumByDouble { it.unitPrice * it.quantity }
    println("totalPrice: $totalPrice")

    val vegetables = groceries.filter { it.category == "Vegetable" }
    val unitPriceOver3 = groceries.filter { it.unitPrice > 3.0 }
    val nonFrozen = groceries.filterNot { it.category != "Frozen" }

    val groceryNames = groceries.map { it.name }
    val halfUnitPrice = groceries.map { it.unitPrice * 0.5 }

    val newPrices = groceries.filter { it.unitPrice > 3.0 }
            .map { it.unitPrice * 2 }

    for (item in groceries) {
        println(item.name)
    }

    groceries.forEach { println(it.name) }

    for (item in groceries) {
        if (item.unitPrice > 3.0) println(item.name)
    }

    groceries.filter { it.unitPrice > 3.0 }
            .forEach { println(it.name) }

    var itemNames = ""
    for (item in groceries) {
        itemNames += "${item.name} "
    }
    println("itemNames: $itemNames ")

    itemNames = ""
    groceries.forEach { itemNames += "${it.name} " }
    println("itemNames: $itemNames ")

    val groupBycategory = groceries.groupBy { it.category }
    // println(groupBycategory)
    groceries.groupBy { it.category }.forEach {
        println(it.key)
        it.value.forEach { println("    ${it.name}") }
    }

    val ints = listOf<Int>(1, 2, 3)
    val sumOfInts = ints.fold(0) {
        runningSum, item -> runningSum + item
    }

    println("sumOfInts: $sumOfInts")
    println(sumOfInts.javaClass.kotlin.simpleName)

    val productOfInts = ints.fold(1) {
        runningSum, item -> runningSum * item
    }
    println("productOfInts: $productOfInts")

    val names = groceries.fold("") {
        string, item -> string + " ${item.name}" }
    println("names: $names")

    val changeFrom50 = groceries.fold(50.0) {
        change, item -> change - item.unitPrice * item.quantity
    }
    println("changeFrom50: $changeFrom50")
}

Compiled from "Groceries.kt"
public final class com.booknara.practice.kotlin.higherorderfunction.GroceriesKt {
  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #9                  // String args
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_5
       7: anewarray     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
      10: astore_2
      11: aload_2
      12: iconst_0
      13: new           #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
      16: dup
      17: ldc           #19                 // String Tomatoes
      19: ldc           #21                 // String Vegetable
      21: ldc           #23                 // String lb
      23: ldc2_w        #24                 // double 3.0d
      26: iconst_3
      27: invokespecial #29                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery."<init>":(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;DI)V
      30: aastore
      31: aload_2
      32: iconst_1
      33: new           #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
      36: dup
      37: ldc           #31                 // String Mushroom
      39: ldc           #21                 // String Vegetable
      41: ldc           #23                 // String lb
      43: ldc2_w        #32                 // double 4.0d
      46: iconst_1
      47: invokespecial #29                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery."<init>":(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;DI)V
      50: aastore
      51: aload_2
      52: iconst_2
      53: new           #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
      56: dup
      57: ldc           #35                 // String Bagels
      59: ldc           #37                 // String Bakery
      61: ldc           #39                 // String Pack
      63: ldc2_w        #40                 // double 1.5d
      66: iconst_2
      67: invokespecial #29                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery."<init>":(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;DI)V
      70: aastore
      71: aload_2
      72: iconst_3
      73: new           #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
      76: dup
      77: ldc           #43                 // String Olive oil
      79: ldc           #45                 // String Pantry
      81: ldc           #47                 // String Bottle
      83: ldc2_w        #48                 // double 6.0d
      86: iconst_1
      87: invokespecial #29                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery."<init>":(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;DI)V
      90: aastore
      91: aload_2
      92: iconst_4
      93: new           #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
      96: dup
      97: ldc           #51                 // String Ice cream
      99: ldc           #53                 // String Frozen
     101: ldc           #39                 // String Pack
     103: ldc2_w        #24                 // double 3.0d
     106: iconst_2
     107: invokespecial #29                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery."<init>":(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;DI)V
     110: aastore
     111: aload_2
     112: invokestatic  #59                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     115: astore_1
     116: aload_1
     117: checkcast     #61                 // class java/lang/Iterable
     120: astore_3
     121: iconst_0
     122: istore        4
     124: aload_3
     125: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     130: astore        5
     132: aload         5
     134: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     139: ifne          150
     142: new           #73                 // class java/util/NoSuchElementException
     145: dup
     146: invokespecial #76                 // Method java/util/NoSuchElementException."<init>":()V
     149: athrow
     150: aload         5
     152: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     157: astore        6
     159: aload         5
     161: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     166: ifne          174
     169: aload         6
     171: goto          253
     174: aload         6
     176: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     179: astore        7
     181: iconst_0
     182: istore        9
     184: aload         7
     186: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
     189: iconst_5
     190: i2d
     191: dmul
     192: dstore        7
     194: aload         5
     196: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     201: astore        9
     203: aload         9
     205: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     208: astore        10
     210: iconst_0
     211: istore        12
     213: aload         10
     215: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
     218: iconst_5
     219: i2d
     220: dmul
     221: dstore        10
     223: dload         7
     225: dload         10
     227: invokestatic  #90                 // Method java/lang/Double.compare:(DD)I
     230: ifge          241
     233: aload         9
     235: astore        6
     237: dload         10
     239: dstore        7
     241: aload         5
     243: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     248: ifne          194
     251: aload         6
     253: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     256: astore_2
     257: new           #92                 // class java/lang/StringBuilder
     260: dup
     261: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
     264: ldc           #95                 // String highestUnitPrice:
     266: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     269: aload_2
     270: invokevirtual #102                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     273: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     276: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
     279: swap
     280: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     283: aload_1
     284: checkcast     #61                 // class java/lang/Iterable
     287: astore        4
     289: iconst_0
     290: istore        5
     292: aload         4
     294: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     299: astore        6
     301: aload         6
     303: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     308: ifne          319
     311: new           #73                 // class java/util/NoSuchElementException
     314: dup
     315: invokespecial #76                 // Method java/util/NoSuchElementException."<init>":()V
     318: athrow
     319: aload         6
     321: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     326: astore        7
     328: aload         6
     330: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     335: ifne          343
     338: aload         7
     340: goto          413
     343: aload         7
     345: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     348: astore        9
     350: iconst_0
     351: istore        10
     353: aload         9
     355: invokevirtual #122                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getQuantity:()I
     358: istore        9
     360: aload         6
     362: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     367: astore        10
     369: aload         10
     371: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     374: astore        12
     376: iconst_0
     377: istore        13
     379: aload         12
     381: invokevirtual #122                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getQuantity:()I
     384: istore        12
     386: iload         9
     388: iload         12
     390: if_icmple     401
     393: aload         10
     395: astore        7
     397: iload         12
     399: istore        9
     401: aload         6
     403: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     408: ifne          360
     411: aload         7
     413: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     416: astore_3
     417: new           #92                 // class java/lang/StringBuilder
     420: dup
     421: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
     424: ldc           #124                // String lowestQuantity:
     426: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     429: aload_3
     430: invokevirtual #102                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     433: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     436: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
     439: swap
     440: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     443: aload_1
     444: checkcast     #61                 // class java/lang/Iterable
     447: astore        5
     449: iconst_0
     450: istore        6
     452: iconst_0
     453: istore        7
     455: aload         5
     457: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     462: astore        9
     464: aload         9
     466: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     471: ifeq          514
     474: aload         9
     476: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     481: astore        10
     483: iload         7
     485: aload         10
     487: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     490: astore        12
     492: istore        35
     494: iconst_0
     495: istore        13
     497: aload         12
     499: invokevirtual #122                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getQuantity:()I
     502: istore        36
     504: iload         35
     506: iload         36
     508: iadd
     509: istore        7
     511: goto          464
     514: iload         7
     516: istore        4
     518: new           #92                 // class java/lang/StringBuilder
     521: dup
     522: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
     525: ldc           #126                // String sumQuantity:
     527: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     530: iload         4
     532: invokevirtual #129                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     535: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     538: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
     541: swap
     542: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     545: aload_1
     546: checkcast     #61                 // class java/lang/Iterable
     549: astore        7
     551: iconst_0
     552: istore        9
     554: dconst_0
     555: dstore        10
     557: aload         7
     559: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     564: astore        13
     566: aload         13
     568: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     573: ifeq          623
     576: aload         13
     578: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     583: astore        14
     585: dload         10
     587: aload         14
     589: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     592: astore        15
     594: dstore        35
     596: iconst_0
     597: istore        16
     599: aload         15
     601: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
     604: aload         15
     606: invokevirtual #122                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getQuantity:()I
     609: i2d
     610: dmul
     611: dstore        37
     613: dload         35
     615: dload         37
     617: dadd
     618: dstore        10
     620: goto          566
     623: dload         10
     625: dstore        5
     627: new           #92                 // class java/lang/StringBuilder
     630: dup
     631: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
     634: ldc           #131                // String totalPrice:
     636: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     639: dload         5
     641: invokevirtual #134                // Method java/lang/StringBuilder.append:(D)Ljava/lang/StringBuilder;
     644: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     647: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
     650: swap
     651: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     654: aload_1
     655: checkcast     #61                 // class java/lang/Iterable
     658: astore        9
     660: iconst_0
     661: istore        10
     663: aload         9
     665: astore        12
     667: new           #136                // class java/util/ArrayList
     670: dup
     671: invokespecial #137                // Method java/util/ArrayList."<init>":()V
     674: checkcast     #139                // class java/util/Collection
     677: astore        13
     679: iconst_0
     680: istore        14
     682: aload         12
     684: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     689: astore        15
     691: aload         15
     693: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     698: ifeq          746
     701: aload         15
     703: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     708: astore        16
     710: aload         16
     712: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     715: astore        17
     717: iconst_0
     718: istore        18
     720: aload         17
     722: invokevirtual #142                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getCategory:()Ljava/lang/String;
     725: ldc           #21                 // String Vegetable
     727: invokestatic  #146                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     730: ifeq          691
     733: aload         13
     735: aload         16
     737: invokeinterface #150,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     742: pop
     743: goto          691
     746: aload         13
     748: checkcast     #152                // class java/util/List
     751: nop
     752: astore        7
     754: aload_1
     755: checkcast     #61                 // class java/lang/Iterable
     758: astore        10
     760: iconst_0
     761: istore        12
     763: aload         10
     765: astore        13
     767: new           #136                // class java/util/ArrayList
     770: dup
     771: invokespecial #137                // Method java/util/ArrayList."<init>":()V
     774: checkcast     #139                // class java/util/Collection
     777: astore        14
     779: iconst_0
     780: istore        15
     782: aload         13
     784: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     789: astore        16
     791: aload         16
     793: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     798: ifeq          853
     801: aload         16
     803: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     808: astore        17
     810: aload         17
     812: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     815: astore        18
     817: iconst_0
     818: istore        19
     820: aload         18
     822: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
     825: ldc2_w        #24                 // double 3.0d
     828: dcmpl
     829: ifle          836
     832: iconst_1
     833: goto          837
     836: iconst_0
     837: ifeq          791
     840: aload         14
     842: aload         17
     844: invokeinterface #150,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     849: pop
     850: goto          791
     853: aload         14
     855: checkcast     #152                // class java/util/List
     858: nop
     859: astore        9
     861: aload_1
     862: checkcast     #61                 // class java/lang/Iterable
     865: astore        12
     867: iconst_0
     868: istore        13
     870: aload         12
     872: astore        14
     874: new           #136                // class java/util/ArrayList
     877: dup
     878: invokespecial #137                // Method java/util/ArrayList."<init>":()V
     881: checkcast     #139                // class java/util/Collection
     884: astore        15
     886: iconst_0
     887: istore        16
     889: aload         14
     891: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     896: astore        17
     898: aload         17
     900: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     905: ifeq          961
     908: aload         17
     910: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     915: astore        18
     917: aload         18
     919: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
     922: astore        19
     924: iconst_0
     925: istore        20
     927: aload         19
     929: invokevirtual #142                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getCategory:()Ljava/lang/String;
     932: ldc           #53                 // String Frozen
     934: invokestatic  #146                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     937: ifne          944
     940: iconst_1
     941: goto          945
     944: iconst_0
     945: ifne          898
     948: aload         15
     950: aload         18
     952: invokeinterface #150,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     957: pop
     958: goto          898
     961: aload         15
     963: checkcast     #152                // class java/util/List
     966: nop
     967: astore        10
     969: aload_1
     970: checkcast     #61                 // class java/lang/Iterable
     973: astore        13
     975: iconst_0
     976: istore        14
     978: aload         13
     980: astore        15
     982: new           #136                // class java/util/ArrayList
     985: dup
     986: aload         13
     988: bipush        10
     990: invokestatic  #156                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     993: invokespecial #159                // Method java/util/ArrayList."<init>":(I)V
     996: checkcast     #139                // class java/util/Collection
     999: astore        16
    1001: iconst_0
    1002: istore        17
    1004: aload         15
    1006: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1011: astore        18
    1013: aload         18
    1015: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1020: ifeq          1063
    1023: aload         18
    1025: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1030: astore        19
    1032: aload         16
    1034: aload         19
    1036: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1039: astore        20
    1041: astore        35
    1043: iconst_0
    1044: istore        21
    1046: aload         20
    1048: invokevirtual #162                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getName:()Ljava/lang/String;
    1051: aload         35
    1053: swap
    1054: invokeinterface #150,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1059: pop
    1060: goto          1013
    1063: aload         16
    1065: checkcast     #152                // class java/util/List
    1068: nop
    1069: astore        12
    1071: aload_1
    1072: checkcast     #61                 // class java/lang/Iterable
    1075: astore        14
    1077: iconst_0
    1078: istore        15
    1080: aload         14
    1082: astore        16
    1084: new           #136                // class java/util/ArrayList
    1087: dup
    1088: aload         14
    1090: bipush        10
    1092: invokestatic  #156                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1095: invokespecial #159                // Method java/util/ArrayList."<init>":(I)V
    1098: checkcast     #139                // class java/util/Collection
    1101: astore        17
    1103: iconst_0
    1104: istore        18
    1106: aload         16
    1108: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1113: astore        19
    1115: aload         19
    1117: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1122: ifeq          1172
    1125: aload         19
    1127: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1132: astore        20
    1134: aload         17
    1136: aload         20
    1138: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1141: astore        21
    1143: astore        35
    1145: iconst_0
    1146: istore        22
    1148: aload         21
    1150: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
    1153: ldc2_w        #163                // double 0.5d
    1156: dmul
    1157: invokestatic  #168                // Method java/lang/Double.valueOf:(D)Ljava/lang/Double;
    1160: aload         35
    1162: swap
    1163: invokeinterface #150,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1168: pop
    1169: goto          1115
    1172: aload         17
    1174: checkcast     #152                // class java/util/List
    1177: nop
    1178: astore        13
    1180: aload_1
    1181: checkcast     #61                 // class java/lang/Iterable
    1184: astore        15
    1186: iconst_0
    1187: istore        16
    1189: aload         15
    1191: astore        17
    1193: new           #136                // class java/util/ArrayList
    1196: dup
    1197: invokespecial #137                // Method java/util/ArrayList."<init>":()V
    1200: checkcast     #139                // class java/util/Collection
    1203: astore        18
    1205: iconst_0
    1206: istore        19
    1208: aload         17
    1210: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1215: astore        20
    1217: aload         20
    1219: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1224: ifeq          1279
    1227: aload         20
    1229: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1234: astore        21
    1236: aload         21
    1238: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1241: astore        22
    1243: iconst_0
    1244: istore        23
    1246: aload         22
    1248: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
    1251: ldc2_w        #24                 // double 3.0d
    1254: dcmpl
    1255: ifle          1262
    1258: iconst_1
    1259: goto          1263
    1262: iconst_0
    1263: ifeq          1217
    1266: aload         18
    1268: aload         21
    1270: invokeinterface #150,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1275: pop
    1276: goto          1217
    1279: aload         18
    1281: checkcast     #152                // class java/util/List
    1284: nop
    1285: checkcast     #61                 // class java/lang/Iterable
    1288: astore        15
    1290: nop
    1291: iconst_0
    1292: istore        16
    1294: aload         15
    1296: astore        17
    1298: new           #136                // class java/util/ArrayList
    1301: dup
    1302: aload         15
    1304: bipush        10
    1306: invokestatic  #156                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1309: invokespecial #159                // Method java/util/ArrayList."<init>":(I)V
    1312: checkcast     #139                // class java/util/Collection
    1315: astore        18
    1317: iconst_0
    1318: istore        19
    1320: aload         17
    1322: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1327: astore        20
    1329: aload         20
    1331: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1336: ifeq          1385
    1339: aload         20
    1341: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1346: astore        21
    1348: aload         18
    1350: aload         21
    1352: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1355: astore        22
    1357: astore        35
    1359: iconst_0
    1360: istore        23
    1362: aload         22
    1364: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
    1367: iconst_2
    1368: i2d
    1369: dmul
    1370: invokestatic  #168                // Method java/lang/Double.valueOf:(D)Ljava/lang/Double;
    1373: aload         35
    1375: swap
    1376: invokeinterface #150,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1381: pop
    1382: goto          1329
    1385: aload         18
    1387: checkcast     #152                // class java/util/List
    1390: nop
    1391: astore        14
    1393: aload_1
    1394: invokeinterface #169,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
    1399: astore        15
    1401: aload         15
    1403: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1408: ifeq          1438
    1411: aload         15
    1413: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1418: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1421: astore        16
    1423: aload         16
    1425: invokevirtual #162                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getName:()Ljava/lang/String;
    1428: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    1431: swap
    1432: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1435: goto          1401
    1438: aload_1
    1439: checkcast     #61                 // class java/lang/Iterable
    1442: astore        15
    1444: iconst_0
    1445: istore        16
    1447: aload         15
    1449: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1454: astore        17
    1456: aload         17
    1458: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1463: ifeq          1502
    1466: aload         17
    1468: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1473: astore        18
    1475: aload         18
    1477: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1480: astore        19
    1482: iconst_0
    1483: istore        20
    1485: aload         19
    1487: invokevirtual #162                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getName:()Ljava/lang/String;
    1490: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    1493: swap
    1494: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1497: nop
    1498: nop
    1499: goto          1456
    1502: nop
    1503: aload_1
    1504: invokeinterface #169,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
    1509: astore        15
    1511: aload         15
    1513: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1518: ifeq          1560
    1521: aload         15
    1523: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1528: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1531: astore        16
    1533: aload         16
    1535: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
    1538: ldc2_w        #24                 // double 3.0d
    1541: dcmpl
    1542: ifle          1511
    1545: aload         16
    1547: invokevirtual #162                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getName:()Ljava/lang/String;
    1550: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    1553: swap
    1554: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1557: goto          1511
    1560: aload_1
    1561: checkcast     #61                 // class java/lang/Iterable
    1564: astore        15
    1566: iconst_0
    1567: istore        16
    1569: aload         15
    1571: astore        17
    1573: new           #136                // class java/util/ArrayList
    1576: dup
    1577: invokespecial #137                // Method java/util/ArrayList."<init>":()V
    1580: checkcast     #139                // class java/util/Collection
    1583: astore        18
    1585: iconst_0
    1586: istore        19
    1588: aload         17
    1590: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1595: astore        20
    1597: aload         20
    1599: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1604: ifeq          1659
    1607: aload         20
    1609: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1614: astore        21
    1616: aload         21
    1618: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1621: astore        22
    1623: iconst_0
    1624: istore        23
    1626: aload         22
    1628: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
    1631: ldc2_w        #24                 // double 3.0d
    1634: dcmpl
    1635: ifle          1642
    1638: iconst_1
    1639: goto          1643
    1642: iconst_0
    1643: ifeq          1597
    1646: aload         18
    1648: aload         21
    1650: invokeinterface #150,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1655: pop
    1656: goto          1597
    1659: aload         18
    1661: checkcast     #152                // class java/util/List
    1664: nop
    1665: checkcast     #61                 // class java/lang/Iterable
    1668: astore        15
    1670: nop
    1671: iconst_0
    1672: istore        16
    1674: aload         15
    1676: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1681: astore        17
    1683: aload         17
    1685: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1690: ifeq          1729
    1693: aload         17
    1695: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1700: astore        18
    1702: aload         18
    1704: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1707: astore        19
    1709: iconst_0
    1710: istore        20
    1712: aload         19
    1714: invokevirtual #162                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getName:()Ljava/lang/String;
    1717: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    1720: swap
    1721: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1724: nop
    1725: nop
    1726: goto          1683
    1729: nop
    1730: aconst_null
    1731: astore        15
    1733: ldc           #171                // String
    1735: astore        15
    1737: aload_1
    1738: invokeinterface #169,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
    1743: astore        16
    1745: aload         16
    1747: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1752: ifeq          1800
    1755: aload         16
    1757: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1762: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1765: astore        17
    1767: new           #92                 // class java/lang/StringBuilder
    1770: dup
    1771: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    1774: aload         15
    1776: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1779: aload         17
    1781: invokevirtual #162                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getName:()Ljava/lang/String;
    1784: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1787: bipush        32
    1789: invokevirtual #174                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
    1792: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1795: astore        15
    1797: goto          1745
    1800: new           #92                 // class java/lang/StringBuilder
    1803: dup
    1804: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    1807: ldc           #176                // String itemNames:
    1809: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1812: aload         15
    1814: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1817: bipush        32
    1819: invokevirtual #174                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
    1822: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1825: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    1828: swap
    1829: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1832: ldc           #171                // String
    1834: astore        15
    1836: aload_1
    1837: checkcast     #61                 // class java/lang/Iterable
    1840: astore        16
    1842: iconst_0
    1843: istore        17
    1845: aload         16
    1847: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1852: astore        18
    1854: aload         18
    1856: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1861: ifeq          1917
    1864: aload         18
    1866: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1871: astore        19
    1873: aload         19
    1875: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    1878: astore        20
    1880: iconst_0
    1881: istore        21
    1883: new           #92                 // class java/lang/StringBuilder
    1886: dup
    1887: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    1890: aload         15
    1892: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1895: aload         20
    1897: invokevirtual #162                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getName:()Ljava/lang/String;
    1900: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1903: bipush        32
    1905: invokevirtual #174                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
    1908: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1911: astore        15
    1913: nop
    1914: goto          1854
    1917: nop
    1918: new           #92                 // class java/lang/StringBuilder
    1921: dup
    1922: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    1925: ldc           #176                // String itemNames:
    1927: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1930: aload         15
    1932: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1935: bipush        32
    1937: invokevirtual #174                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
    1940: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1943: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    1946: swap
    1947: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1950: aload_1
    1951: checkcast     #61                 // class java/lang/Iterable
    1954: astore        17
    1956: iconst_0
    1957: istore        18
    1959: aload         17
    1961: astore        19
    1963: new           #178                // class java/util/LinkedHashMap
    1966: dup
    1967: invokespecial #179                // Method java/util/LinkedHashMap."<init>":()V
    1970: checkcast     #181                // class java/util/Map
    1973: astore        20
    1975: iconst_0
    1976: istore        21
    1978: aload         19
    1980: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1985: astore        22
    1987: aload         22
    1989: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1994: ifeq          2099
    1997: aload         22
    1999: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2004: astore        23
    2006: aload         23
    2008: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    2011: astore        24
    2013: iconst_0
    2014: istore        26
    2016: aload         24
    2018: invokevirtual #142                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getCategory:()Ljava/lang/String;
    2021: astore        27
    2023: aload         20
    2025: astore        29
    2027: iconst_0
    2028: istore        30
    2030: aload         29
    2032: aload         27
    2034: invokeinterface #185,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
    2039: astore        31
    2041: aload         31
    2043: ifnonnull     2078
    2046: iconst_0
    2047: istore        32
    2049: new           #136                // class java/util/ArrayList
    2052: dup
    2053: invokespecial #137                // Method java/util/ArrayList."<init>":()V
    2056: checkcast     #152                // class java/util/List
    2059: astore        32
    2061: aload         29
    2063: aload         27
    2065: aload         32
    2067: invokeinterface #189,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    2072: pop
    2073: aload         32
    2075: goto          2080
    2078: aload         31
    2080: nop
    2081: checkcast     #152                // class java/util/List
    2084: astore        24
    2086: aload         24
    2088: aload         23
    2090: invokeinterface #190,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
    2095: pop
    2096: goto          1987
    2099: aload         20
    2101: nop
    2102: astore        16
    2104: aload_1
    2105: checkcast     #61                 // class java/lang/Iterable
    2108: astore        17
    2110: iconst_0
    2111: istore        18
    2113: aload         17
    2115: astore        19
    2117: new           #178                // class java/util/LinkedHashMap
    2120: dup
    2121: invokespecial #179                // Method java/util/LinkedHashMap."<init>":()V
    2124: checkcast     #181                // class java/util/Map
    2127: astore        20
    2129: iconst_0
    2130: istore        21
    2132: aload         19
    2134: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    2139: astore        22
    2141: aload         22
    2143: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2148: ifeq          2253
    2151: aload         22
    2153: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2158: astore        23
    2160: aload         23
    2162: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    2165: astore        24
    2167: iconst_0
    2168: istore        26
    2170: aload         24
    2172: invokevirtual #142                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getCategory:()Ljava/lang/String;
    2175: astore        27
    2177: aload         20
    2179: astore        29
    2181: iconst_0
    2182: istore        30
    2184: aload         29
    2186: aload         27
    2188: invokeinterface #185,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
    2193: astore        31
    2195: aload         31
    2197: ifnonnull     2232
    2200: iconst_0
    2201: istore        32
    2203: new           #136                // class java/util/ArrayList
    2206: dup
    2207: invokespecial #137                // Method java/util/ArrayList."<init>":()V
    2210: checkcast     #152                // class java/util/List
    2213: astore        32
    2215: aload         29
    2217: aload         27
    2219: aload         32
    2221: invokeinterface #189,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    2226: pop
    2227: aload         32
    2229: goto          2234
    2232: aload         31
    2234: nop
    2235: checkcast     #152                // class java/util/List
    2238: astore        24
    2240: aload         24
    2242: aload         23
    2244: invokeinterface #190,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
    2249: pop
    2250: goto          2141
    2253: aload         20
    2255: nop
    2256: astore        17
    2258: nop
    2259: iconst_0
    2260: istore        18
    2262: aload         17
    2264: invokeinterface #194,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
    2269: invokeinterface #197,  1          // InterfaceMethod java/util/Set.iterator:()Ljava/util/Iterator;
    2274: astore        19
    2276: aload         19
    2278: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2283: ifeq          2413
    2286: aload         19
    2288: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2293: checkcast     #199                // class java/util/Map$Entry
    2296: astore        20
    2298: aload         20
    2300: astore        21
    2302: iconst_0
    2303: istore        22
    2305: aload         21
    2307: invokeinterface #202,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
    2312: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    2315: swap
    2316: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2319: aload         21
    2321: invokeinterface #205,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
    2326: checkcast     #61                 // class java/lang/Iterable
    2329: astore        23
    2331: iconst_0
    2332: istore        24
    2334: aload         23
    2336: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    2341: astore        26
    2343: aload         26
    2345: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2350: ifeq          2407
    2353: aload         26
    2355: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2360: astore        27
    2362: aload         27
    2364: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    2367: astore        29
    2369: iconst_0
    2370: istore        30
    2372: new           #92                 // class java/lang/StringBuilder
    2375: dup
    2376: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    2379: ldc           #207                // String
    2381: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2384: aload         29
    2386: invokevirtual #162                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getName:()Ljava/lang/String;
    2389: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2392: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2395: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    2398: swap
    2399: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2402: nop
    2403: nop
    2404: goto          2343
    2407: nop
    2408: nop
    2409: nop
    2410: goto          2276
    2413: nop
    2414: iconst_3
    2415: anewarray     #209                // class java/lang/Integer
    2418: astore        18
    2420: aload         18
    2422: iconst_0
    2423: iconst_1
    2424: invokestatic  #212                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    2427: aastore
    2428: aload         18
    2430: iconst_1
    2431: iconst_2
    2432: invokestatic  #212                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    2435: aastore
    2436: aload         18
    2438: iconst_2
    2439: iconst_3
    2440: invokestatic  #212                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    2443: aastore
    2444: aload         18
    2446: invokestatic  #59                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
    2449: astore        17
    2451: aload         17
    2453: checkcast     #61                 // class java/lang/Iterable
    2456: astore        19
    2458: iconst_0
    2459: istore        20
    2461: iconst_0
    2462: istore        21
    2464: iload         20
    2466: istore        22
    2468: aload         19
    2470: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    2475: astore        23
    2477: aload         23
    2479: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2484: ifeq          2523
    2487: aload         23
    2489: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2494: astore        24
    2496: iload         22
    2498: aload         24
    2500: checkcast     #214                // class java/lang/Number
    2503: invokevirtual #217                // Method java/lang/Number.intValue:()I
    2506: istore        26
    2508: istore        27
    2510: iconst_0
    2511: istore        29
    2513: iload         27
    2515: iload         26
    2517: iadd
    2518: istore        22
    2520: goto          2477
    2523: iload         22
    2525: istore        18
    2527: new           #92                 // class java/lang/StringBuilder
    2530: dup
    2531: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    2534: ldc           #219                // String sumOfInts:
    2536: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2539: iload         18
    2541: invokevirtual #129                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    2544: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2547: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    2550: swap
    2551: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2554: getstatic     #223                // Field java/lang/Integer.TYPE:Ljava/lang/Class;
    2557: invokestatic  #229                // Method kotlin/jvm/JvmClassMappingKt.getKotlinClass:(Ljava/lang/Class;)Lkotlin/reflect/KClass;
    2560: invokeinterface #234,  1          // InterfaceMethod kotlin/reflect/KClass.getSimpleName:()Ljava/lang/String;
    2565: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    2568: swap
    2569: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2572: aload         17
    2574: checkcast     #61                 // class java/lang/Iterable
    2577: astore        20
    2579: iconst_1
    2580: istore        21
    2582: iconst_0
    2583: istore        22
    2585: iload         21
    2587: istore        23
    2589: aload         20
    2591: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    2596: astore        24
    2598: aload         24
    2600: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2605: ifeq          2644
    2608: aload         24
    2610: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2615: astore        26
    2617: iload         23
    2619: aload         26
    2621: checkcast     #214                // class java/lang/Number
    2624: invokevirtual #217                // Method java/lang/Number.intValue:()I
    2627: istore        27
    2629: istore        29
    2631: iconst_0
    2632: istore        30
    2634: iload         29
    2636: iload         27
    2638: imul
    2639: istore        23
    2641: goto          2598
    2644: iload         23
    2646: istore        19
    2648: new           #92                 // class java/lang/StringBuilder
    2651: dup
    2652: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    2655: ldc           #236                // String productOfInts:
    2657: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2660: iload         19
    2662: invokevirtual #129                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    2665: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2668: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    2671: swap
    2672: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2675: aload_1
    2676: checkcast     #61                 // class java/lang/Iterable
    2679: astore        21
    2681: ldc           #171                // String
    2683: astore        22
    2685: iconst_0
    2686: istore        23
    2688: aload         22
    2690: astore        24
    2692: aload         21
    2694: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    2699: astore        26
    2701: aload         26
    2703: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2708: ifeq          2767
    2711: aload         26
    2713: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2718: astore        27
    2720: aload         24
    2722: aload         27
    2724: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    2727: astore        29
    2729: astore        30
    2731: iconst_0
    2732: istore        31
    2734: new           #92                 // class java/lang/StringBuilder
    2737: dup
    2738: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    2741: aload         30
    2743: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2746: bipush        32
    2748: invokevirtual #174                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
    2751: aload         29
    2753: invokevirtual #162                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getName:()Ljava/lang/String;
    2756: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2759: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2762: astore        24
    2764: goto          2701
    2767: aload         24
    2769: astore        20
    2771: new           #92                 // class java/lang/StringBuilder
    2774: dup
    2775: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    2778: ldc           #238                // String names:
    2780: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2783: aload         20
    2785: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2788: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2791: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    2794: swap
    2795: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2798: aload_1
    2799: checkcast     #61                 // class java/lang/Iterable
    2802: astore        23
    2804: ldc2_w        #239                // double 50.0d
    2807: dstore        24
    2809: iconst_0
    2810: istore        26
    2812: dload         24
    2814: dstore        27
    2816: aload         23
    2818: invokeinterface #65,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    2823: astore        29
    2825: aload         29
    2827: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2832: ifeq          2878
    2835: aload         29
    2837: invokeinterface #80,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2842: astore        30
    2844: dload         27
    2846: aload         30
    2848: checkcast     #17                 // class com/booknara/practice/kotlin/higherorderfunction/Grocery
    2851: astore        31
    2853: dstore        32
    2855: iconst_0
    2856: istore        34
    2858: dload         32
    2860: aload         31
    2862: invokevirtual #84                 // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getUnitPrice:()D
    2865: aload         31
    2867: invokevirtual #122                // Method com/booknara/practice/kotlin/higherorderfunction/Grocery.getQuantity:()I
    2870: i2d
    2871: dmul
    2872: dsub
    2873: dstore        27
    2875: goto          2825
    2878: dload         27
    2880: dstore        21
    2882: new           #92                 // class java/lang/StringBuilder
    2885: dup
    2886: invokespecial #93                 // Method java/lang/StringBuilder."<init>":()V
    2889: ldc           #242                // String changeFrom50:
    2891: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2894: dload         21
    2896: invokevirtual #134                // Method java/lang/StringBuilder.append:(D)Ljava/lang/StringBuilder;
    2899: invokevirtual #106                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2902: getstatic     #112                // Field java/lang/System.out:Ljava/io/PrintStream;
    2905: swap
    2906: invokevirtual #118                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2909: return
}