Haskell vs. Clojure (2014)
Obviously, Scala is better than either of those languages.<p><pre><code>    #!&#x2F;usr&#x2F;bin&#x2F;env amm
    import $ivy.`com.typesafe.play::play-json:2.5.8`
    import java.nio.file._, play.api.libs.json._

    val bookOrder = Seq(
        &quot;Genesis&quot;, &quot;Exodus&quot;, &quot;Leviticus&quot;, &quot;Numbers&quot;, &quot;Deuteronomy&quot;,
        &quot;Joshua&quot;, &quot;Judges&quot;, &quot;Ruth&quot;, &quot;1 Samuel&quot;, &quot;2 Samuel&quot;, &quot;1 Kings&quot;, &quot;2 Kings&quot;,
        &quot;1 Chronicles&quot;, &quot;2 Chronicles&quot;, &quot;Ezra&quot;, &quot;Nehemiah&quot;, &quot;Esther&quot;, &quot;Job&quot;,
        &quot;Psalms&quot;, &quot;Proverbs&quot;, &quot;Ecclesiastes&quot;, &quot;Song of Solomon&quot;, &quot;Isaiah&quot;,
        &quot;Jeremiah&quot;, &quot;Lamentations&quot;, &quot;Ezekiel&quot;, &quot;Daniel&quot;, &quot;Hosea&quot;, &quot;Joel&quot;, &quot;Amos&quot;,
        &quot;Obadiah&quot;, &quot;Jonah&quot;, &quot;Micah&quot;, &quot;Nahum&quot;, &quot;Habakkuk&quot;, &quot;Zephaniah&quot;, &quot;Haggai&quot;,
        &quot;Zechariah&quot;, &quot;Malachi&quot;, &quot;Matthew&quot;, &quot;Mark&quot;, &quot;Luke&quot;, &quot;John&quot;, &quot;Acts&quot;,
        &quot;Romans&quot;, &quot;1 Corinthians&quot;, &quot;2 Corinthians&quot;, &quot;Galatians&quot;, &quot;Ephesians&quot;,
        &quot;Philippians&quot;, &quot;Colossians&quot;, &quot;1 Thessalonians&quot;, &quot;2 Thessalonians&quot;,
        &quot;1 Timothy&quot;, &quot;2 Timothy&quot;, &quot;Titus&quot;, &quot;Philemon&quot;, &quot;Hebrews&quot;, &quot;James&quot;,
        &quot;1 Peter&quot;, &quot;2 Peter&quot;, &quot;1 John&quot;, &quot;2 John&quot;, &quot;3 John&quot;, &quot;Jude&quot;, &quot;Revelation&quot;
      ).zipWithIndex.toMap

    val bible = Json.parse(Files.readAllBytes(Paths.get(&quot;ESV.json&quot;)))
      .as[Map[String,Map[String,Map[String,String]]]]

    val flattened = for((book, x) &lt;- bible; (chapter, x) &lt;- x; (verse, x) &lt;- x)
      yield (book, chapter.toInt, verse.toInt, x)
    val result = flattened.toSeq.sortBy { case (b, c, v, _) =&gt; (bookOrder(b), c, v) }
    println(result)
</code></pre>
---<p>Also, Python<p><pre><code>    #!&#x2F;usr&#x2F;bin&#x2F;env python3
    import json

    books = [
        &quot;Genesis&quot;, &quot;Exodus&quot;, &quot;Leviticus&quot;, &quot;Numbers&quot;, &quot;Deuteronomy&quot;,
        &quot;Joshua&quot;, &quot;Judges&quot;, &quot;Ruth&quot;, &quot;1 Samuel&quot;, &quot;2 Samuel&quot;, &quot;1 Kings&quot;, &quot;2 Kings&quot;,
        &quot;1 Chronicles&quot;, &quot;2 Chronicles&quot;, &quot;Ezra&quot;, &quot;Nehemiah&quot;, &quot;Esther&quot;, &quot;Job&quot;,
        &quot;Psalms&quot;, &quot;Proverbs&quot;, &quot;Ecclesiastes&quot;, &quot;Song of Solomon&quot;, &quot;Isaiah&quot;,
        &quot;Jeremiah&quot;, &quot;Lamentations&quot;, &quot;Ezekiel&quot;, &quot;Daniel&quot;, &quot;Hosea&quot;, &quot;Joel&quot;, &quot;Amos&quot;,
        &quot;Obadiah&quot;, &quot;Jonah&quot;, &quot;Micah&quot;, &quot;Nahum&quot;, &quot;Habakkuk&quot;, &quot;Zephaniah&quot;, &quot;Haggai&quot;,
        &quot;Zechariah&quot;, &quot;Malachi&quot;, &quot;Matthew&quot;, &quot;Mark&quot;, &quot;Luke&quot;, &quot;John&quot;, &quot;Acts&quot;,
        &quot;Romans&quot;, &quot;1 Corinthians&quot;, &quot;2 Corinthians&quot;, &quot;Galatians&quot;, &quot;Ephesians&quot;,
        &quot;Philippians&quot;, &quot;Colossians&quot;, &quot;1 Thessalonians&quot;, &quot;2 Thessalonians&quot;,
        &quot;1 Timothy&quot;, &quot;2 Timothy&quot;, &quot;Titus&quot;, &quot;Philemon&quot;, &quot;Hebrews&quot;, &quot;James&quot;,
        &quot;1 Peter&quot;, &quot;2 Peter&quot;, &quot;1 John&quot;, &quot;2 John&quot;, &quot;3 John&quot;, &quot;Jude&quot;, &quot;Revelation&quot;
    ]
    books = {book:i for i, book in enumerate(books)}

    with open(&#x27;ESV.json&#x27;) as f:
        result = sorted(
            ((b, int(c), int(v), x) for b, x in json.load(f).items() for c, x in x.items() for v, x in x.items()),
            key=lambda part: (books[part[0]], part[1:])
        )
    print(result)
</code></pre>
---<p>Glad we&#x27;ve put that to rest.