fork download
  1. module main;
  2.  
  3. import std.stdio, std.algorithm;
  4.  
  5. void main() {
  6. alias isDigit = (x, y) =>
  7. ((x >= '0') && (x <= '9')) &&
  8. ((y >= '0') && (y <= '9'));
  9.  
  10. "429(69-37)+(8-6)/2"
  11. .chunkBy!isDigit
  12. .writeln;
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.d(6): Error: basic type expected, not (
prog.d(6): Error: function declaration without return type. (Note that constructors are always named 'this')
prog.d(6): Error: semicolon expected to close alias declaration
prog.d(6): Error: found '=>' instead of statement
stdout
Standard output is empty