I wonder if it can be designed as a (pretty classi...
# datascience
o
I wonder if it can be designed as a (pretty classic) “process” model. It normally looks like you create a Process instance, then feed it with data and it does normal
map
,
aggregate
and
combine
operations. E.g. if you want an average you do something like
Copy code
fun ageAverage(list : List<Person>) {
  val process = Process<Person>(list) // create a process for iterating over a dataset
  val avg = process.average { it.age } // create a track that will calculate an average, with a mapping function
  process.run() // run the process, it will feed each track with data
  return track.result // get result 
}