Skip to content

ex1 05

← Back

Basic Info

Functional Programming
└── Lab ML
    └── 0​307
        └── ex1 05.sml

Preview

(*Find the third character of a string (it doesn’t have to work properly on shorter strings)*)

fun third (l) = hd (tl(tl(l)));

fun thirdchar(s) = third(explode s);