Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun duplicate str = str ^ str ;
- fun clip str = substring(str,0,size str -1);
- fun middle str = substring(str, size str div 2,1);
- fun dtrunk str = substring(str, 1 , size str - 2);
- fun incFirst stri = str(chr (ord (String.sub(substring(stri,0,1),0)) +1)) ^ substring(stri, 1 , size stri - 1);
- fun switch stri = substring(stri,size stri div 2, size stri - size stri div 2) ^ substring(stri, 0,size stri div 2) ;
- val first = str o hd o explode;
- val second = str o hd o tl o explode;
- val third = str o hd o tl o tl o explode;
- val fourth = str o hd o tl o tl o tl o explode;
- val last = str o hd o rev o explode;
- fun roll s = fourth s ^ first s ^ second s ^ third s;
- fun exch s = second s ^ first s ^ third s ^ fourth s;
- val what = roll o roll o roll o exch o roll;
- val fb = roll o roll o roll;
- val fc = roll o exch o roll o roll o roll;
- val fd = roll o exch o roll o roll o exch o roll o roll;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement