Beispiel #1
0
        public static ImList <T> Transform <T>(Func <T, T> iterator, ImList <T> list)
        {
            var transformedList = Im.Fold <T, List <T> >((List <T> acc, T item) => {
                acc.Insert(0, iterator(item));
                return(acc);
            }, new List <T>(), list);

            return(new ImList <T>(transformedList));
        }
Beispiel #2
0
 private ImMap <string, LocatorTarget> GetTargetList(
     string domain,
     ImMap <string, ImMap <string, LocatorTarget> > registrationList
     )
 {
     if (!registrationList.Has(domain))
     {
         return(Im.Map <LocatorTarget>());
     }
     return(RegistrationList[domain]);
 }
Beispiel #3
0
 private LocatorTarget Wrap(LocatorTarget target)
 {
     return(Im.Fold <LocatorPlug, LocatorTarget>(WrapByPlug, target, Plugs));
 }
Beispiel #4
0
 private PlugState Transform(PlugState plugState)
 {
     return(Im.Fold <LocatorPlug, PlugState>(TransformByPlug, plugState, Plugs));
 }