Convert a List into an Option if it is populated

前端 未结 5 1886
北荒
北荒 2020-12-15 20:55

I have a method that should convert a list to an Option of an object, or None if the list is empty.

def listToOption(myList: List[F         


        
5条回答
提交回复
热议问题