Add sample for text version of chunked
This commit is contained in:
committed by
Ilya Gorbunov
parent
3f9892a49d
commit
e8ee405cdb
@@ -49,6 +49,15 @@ class Strings {
|
||||
assertPrints(withoutMargin2, "XYZ\nfoo\nbar")
|
||||
}
|
||||
|
||||
@Sample
|
||||
fun chunked() {
|
||||
val dnaFragment = "ATTCGCGGCCGCCAA"
|
||||
|
||||
val codons = dnaFragment.chunked(3)
|
||||
|
||||
assertPrints(codons, "[ATT, CGC, GGC, CGC, CAA]")
|
||||
}
|
||||
|
||||
@Sample
|
||||
fun chunkedTransform() {
|
||||
val codonTable = mapOf("ATT" to "Isoleucine", "CAA" to "Glutamine", "CGC" to "Arginine", "GGC" to "Glycine")
|
||||
|
||||
Reference in New Issue
Block a user