This code :
1234.toString.map(_.asDigit)
returns :
scala.collection.immutable.IndexedSeq[Int] = Vector(1, 2, 3, 4)
but I need a scala.collection.immutable.IndexedSeq[BigInt]
There does not seem to be a method such as asBigInt which will convert the String characters to BigInt . How can this be done ?
1234.toString.map(_.asDigit).map(BigInt(_))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With