fork download
  1. import std.algorithm;
  2. import std.stdio;
  3.  
  4. enum INPUT = "cqrb lryqna rb fjh, fjh qjamna cqjw axc cqracnnw. qnan,
  5. hxd wnena twxf qxf oja cx bqroc! xq kh cqn fjh, cqn jwbfna rb
  6. mnjmvjwblqnbc.";
  7.  
  8. void main() {
  9. foreach ( offset; 0..25 ) {
  10. writeln( map!( ( dchar c ) {
  11. if ( c < 'a' ) return c;
  12. if ( 'z' < c ) return c;
  13. return cast( dchar )( ( ( ( c - 'a' ) + offset ) % 26 ) + 'a' );
  14. } )( INPUT ) );
  15. }
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.d(11): Error: delegate std.algorithm.__dgliteral1 cannot access frame of function __dgliteral1
prog.d(11): Error: delegate std.algorithm.__dgliteral1 cannot access frame of function __dgliteral1
prog.d(12): Error: delegate std.algorithm.__dgliteral1 cannot access frame of function __dgliteral1
prog.d(12): Error: delegate std.algorithm.__dgliteral1 cannot access frame of function __dgliteral1
prog.d(13): Error: delegate std.algorithm.__dgliteral1 cannot access frame of function __dgliteral1
prog.d(13): Error: delegate std.algorithm.__dgliteral1 cannot access frame of function main
prog.d(10): Error: template instance prog.main.map!(delegate dchar(dchar c)
{
if (cast(uint)c < 97u)
return c;
if (122u < cast(uint)c)
return c;
return cast(dchar)((cast(uint)c - 97u + cast(uint)offset) % 26u + 97u);
}
) error instantiating
stdout
Standard output is empty