fork(1) download
  1. import std.stdio;
  2. import std.algorithm;
  3. import std.range;
  4.  
  5. void main() {
  6. int[] array = [2, 3, 3, 4, 5 ];
  7. int index = 3;
  8.  
  9. writeln(find((take(array,index)~drop(array,index+1)),4).length>0);
  10. }
Success #stdin #stdout 0s 4144KB
stdin
Standard input is empty
stdout
false