예제 #1
0
        public override void Read()
        {
            var r = CreateReader();

            ParentOffset = r.ReadUInt32();
            Parent       = r.ReadSymbol(Module, ParentOffset);

            End = r.ReadUInt32();

            NextOffset = r.ReadUInt32();
            Next       = r.ReadSymbol(Module, NextOffset);

            Offset      = r.ReadUInt32();
            Segment     = r.ReadUInt16();
            ThunkLength = r.ReadUInt16();
            ThunkType   = r.ReadEnum <ThunkType>();
            Name        = r.ReadSymbolString();
            Thunk       = r.ReadThunk(ThunkType);
        }
예제 #2
0
 public static IThunk <B> Fmap <A, B>(this IThunk <A> thunk, Func <A, B> convert)
 {
     return(new Thunk <B>(() => convert(thunk.Force())));
 }
예제 #3
0
 public static IEnumerable <TResult> Maped <T, TResult>(IEnumerable <T> array, IThunk <T, TResult> thunk)
 {
     return(array.Select(thunk.Result));
 }