fork download
  1. let process x =
  2. let len = String.length x in
  3. let r = Buffer.create 100 in
  4. let rec rest i =
  5. if i < len then match x.[i] with
  6. | '$' -> var (i+1)
  7. | c -> Buffer.add_char r c; rest (i+1)
  8. and var i =
  9. if i < len then match x.[i] with
  10. | 'a'..'z' | 'A'..'Z' -> var (i+1)
  11. | _ -> rest i in
  12. rest 0;
  13. Buffer.contents r
  14.  
Success #stdin #stdout 0.01s 2736KB
stdin
Standard input is empty
stdout
Standard output is empty