title: How to use sortedWith() in kotlin?
body: <p>I am trying to sort that simple list of users by "created". What am I doing wrong?</p>
  
  <pre><code>val user1 = User("2019-01-01 17:42:34")
  val user2 = User("2019-01-02 17:42:34")
  val user3 = User("2019-01-03 17:42:34")
  val list = listOf(user2, user3, user1)
  
  list.sortedWith(compareBy {
      LocalDateTime.parse(
          it.created,
          DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
      )
  })
  
  data class User(val created: String = "")
  </code></pre>