perhaps the entire `when` should have been the fun...
# android
a
perhaps the entire
when
should have been the function result, like
Copy code
{
  when(position) {
    0 -> FragmentA()
    1 -> FragmentB()
  }
}