Obsecure problem 2

pascal111 judas.the.messiah.111 at gmail.com
Wed Aug 3 16:59:53 UTC 2022

I tried to make a template that receive lambda expression to 
apply it on a given range the user specifies, but I found 
non-understood problem:


module main;

import std.stdio;
import std.functional;

     template foo(alias predicate)
     if (is(typeof(unaryFun!predicate)))
         alias notfunny=unaryFun!predicate;

auto foo(Range)(Range range) if (isInputRange!(Unqual!Range)){

         foreach(x; range)

         return range;}


int main()

         int[] lolo = [12, 66, 654, -98, 54];



         return 0;

More information about the Digitalmars-d-learn mailing list