daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fun duplicate str = str ^ str ;
  2.  
  3. fun clip str = substring(str,0,size str -1);
  4. fun middle str = substring(str, size str div 2,1);
  5. fun dtrunk str = substring(str, 1 , size str - 2);
  6. fun incFirst stri = str(chr (ord (String.sub(substring(stri,0,1),0)) +1)) ^ substring(stri, 1 , size stri - 1);
  7. fun switch stri = substring(stri,size stri div 2, size stri - size stri div 2) ^ substring(stri, 0,size stri div 2) ;
  8.  
  9. val first = str o hd o explode;
  10. val second = str o hd o tl o explode;
  11. val third = str o hd o tl o tl o explode;
  12. val fourth = str o hd o tl o tl o tl o explode;
  13. val last = str o hd o rev o explode;
  14.  
  15. fun roll s = fourth s ^ first s ^ second s ^ third s;
  16. fun exch s = second s ^ first s ^ third s ^ fourth s;
  17.  
  18. val what = roll o roll o roll o exch o roll;
  19.  
  20. val fb = roll o roll o roll;
  21. val fc = roll o exch o roll o roll o roll;
  22. val fd = roll o exch o roll o roll o exch o roll o roll;
RAW Paste Data
Top