August 27, 2024
P01 - Find the last element of a list.
Example:
scala
scala> last(List(1, 1, 2, 3, 5, 8))
res0: Int = 8
August 27, 2024
Example:
scala
scala> last(List(1, 1, 2, 3, 5, 8))
res0: Int = 8
Don't have an account? We will create one for you.
Enter the OTP send to
in seconds.